Exemplo n.º 1
0
        public static UserRole ToModel(this UserRoleEditViewModel model)
        {
            return(new UserRole
            {
                ID = model.ID,
                User = new User
                {
                    UserName = model.UserName,
                    Password = model.UserPassword,
                },

                Role = new Role
                {
                    Name = model.RoleName,
                },
            });
        }
Exemplo n.º 2
0
 public void Post(ViewModels.UserRoleEditViewModel model)
 {
     UserRoleService.Add(model);
 }