Beispiel #1
0
        public async Task <ActionResult> SaveRole(IdentityRole role)
        {
            bool result;

            if (string.IsNullOrEmpty(role.Id) || role.Id.Equals("0"))
            {
                result = await _accountLogic.AddRole(role);
            }
            else
            {
                result = await _accountLogic.UpdateRole(role);
            }

            return(new HttpStatusCodeResult(result ? 200 : 500));
        }