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