Ejemplo n.º 1
0
 public ActionResult NewRole( RoleViewModel roleViewModel )
 {
    Role role = new Role();
    SimpleMapper.PropertyMap(roleViewModel, role);
    if( !string.IsNullOrWhiteSpace( role.Name ) )
    {
       _repository.AddRole( role );
       var x = _repository.SaveChanges();
    }
    return RedirectToAction( "Maintenance", "Admin", "Home" );
 }
Ejemplo n.º 2
0
 public void AddRole( Role role )
 {
    _logger.LogInformation( $"New Role Added: {role.Name}" );
    _context.RoleSet.Add( role );
 }