Exemple #1
0
        public async Task <ServiceResponse <bool> > CheckUserForAction(string username, string controllerName, string actionName)
        {
            return(await ExecuteServiceAsync <bool>(async response =>
            {
                using (var session = GetRepositorySession())
                {
                    var repo = new IdentityRepository(session);
                    var data = await repo.CheckUserForAction(username, controllerName, actionName);

                    response.TotalResultCount = data.TotalResultCount;
                    return data.Value;
                }
            }));
        }