예제 #1
0
 public ApplicationRole Convert(IdentityRole role)
 {
     var r = new ApplicationRole()
     {
         Id = role.Id,
         Name = role.Name,
     };
     return r;
 }
예제 #2
0
 private static ApplicationRole ConvetRole(IdentityRole r)
 {
     var role = new ApplicationRole
     {
         Id = r.Id,
         Name = r.Name,
     };
     return role;
 }
예제 #3
0
 public bool Insert(RoleViewModel model)
 {
     bool result = false;
     var role = new ApplicationRole(model.RoleName, model.Description);
     if (_idman.RoleExists(model.RoleName))
     {
         result = false;
     }
     else
     {
         _idman.CreateRole(model.RoleName, model.Description);
         result = true;
     }
     return result;
 }
예제 #4
0
 public void Update(ApplicationRole model)
 {
     _rolesRepository.Update(model);
 }
예제 #5
0
 public void Insert(ApplicationRole model)
 {
     _rolesRepository.Insert(model);
 }
예제 #6
0
 public void Delete(ApplicationRole model)
 {
     _rolesRepository.Delete(model);
 }
예제 #7
0
 public EditRoleViewModel(ApplicationRole role)
 {
     this.OriginalRoleName = role.Name;
     this.RoleName = role.Name;
     this.Description = role.Description;
 }
예제 #8
0
 public RoleViewModel(ApplicationRole role)
 {
     this.RoleName = role.Name;
     this.Description = role.Description;
 }
예제 #9
0
 public SelectRoleEditorViewModel(ApplicationRole role)
 {
     this.RoleName = role.Name;
     this.Description = role.Description;
 }