private Rol Save(CreateEditRolViewModel createEditRolViewModel) { var rol = new Rol(); rol.UpdateRol(createEditRolViewModel); var newRol = _rolRepository.Create(rol); return(newRol); }
/// <summary> /// Metodo de negocio que maneja las reglas y acciones asociadas a la creacion de un registro de Rol en base a los parametros ingresados /// </summary> /// <param name="instance"></param> /// <returns>Rol</returns> public Rol RolCreate(Rol instance) { try { return(repository.Create(instance)); } catch (Exception ex) { GenerarExcepcionNegocio(ex); return(null); } }
public async Task <Rol> Create(Rol rol) { return(await _rolRepository.Create(rol)); }
void Crear(Sg07_Rol Rol) { _RolRepository.Create <Sg07_Rol>(Rol); _RolRepository.Save(); }
public ActionResult <Rol> PostRol(Rol rol) { _rolRepository.Create(rol); return(CreatedAtAction("GetRol", new { id = rol.Id }, rol)); }