using ServiceStack.Common.Utils; namespace ServiceStack { public static class Model { public static object ToId(this T entity) { return entity.GetId(); } public static string ToUrn(object id) { return IdUtils.CreateUrn(id); } public static string ToUrn(this T entity) { return entity.CreateUrn(); } public static string ToSafePathCacheKey(string idValue) { return IdUtils.CreateCacheKeyPath(idValue); } } }