/// <summary> /// Crear registro de Sancion /// Autor: Jair Guerrero /// Fecha: 2020-12-05 /// </summary> public long Create(PersonAM entity) { try { var sancion = mapper.Map <Person>(entity); IRepository <Person> repo = new PersonRepo(context); return(repo.Create(sancion)); } catch (Exception ex) { throw new Exception(ex.Message, ex.InnerException); } }
/// <summary> /// Actualizar person /// Autor: Jair Guerrero /// Fecha: 2021-02-20 /// </summary> public void Update(PersonAM entity) { try { var person = mapper.Map <Person>(entity); IRepository <Person> repo = new PersonRepo(context); repo.Update(person); } catch (Exception ex) { throw new Exception(ex.Message, ex.InnerException); } }