using Bootstrap.Security.DataAccess; using Longbow.Cache; using Longbow.Data; using System.Collections.Generic; namespace Bootstrap.Client.DataAccess { /// /// /// public static class RoleHelper { /// /// /// /// /// public static IEnumerable RetrievesByUserName(string userName) => CacheManager.GetOrAdd(string.Format("{0}-{1}", DbHelper.RetrieveRolesByUserNameDataKey, userName), key => DbContextManager.Create().RetrievesByUserName(userName), DbHelper.RetrieveRolesByUserNameDataKey); /// /// /// /// /// public static IEnumerable RetrievesByUrl(string url) => CacheManager.GetOrAdd(string.Format("{0}-{1}", DbHelper.RetrieveRolesByUrlDataKey, url), key => DbContextManager.Create().RetrievesByUrl(url), DbHelper.RetrieveRolesByUrlDataKey); } }