public void Eliminar(int id) { institutions oInstitution = new institutions { institution_id = id, }; oRepositorio.Delete(oInstitution); oUnitOfWork.SaveChanges(); }
public void Modificar(InstitutionViewModel pInstitutionViewModel) { institutions oinstitutions = oRepositorio.FindById(pInstitutionViewModel.institution_id); oinstitutions.name = pInstitutionViewModel.name; oinstitutions.user_id_modified = pInstitutionViewModel.user_id_modified; oinstitutions.date_modified = DateTime.Now; oRepositorio.Update(oinstitutions); oUnitOfWork.SaveChanges(); }
public void Agregar(InstitutionViewModel pInstitutionViewModel) { institutions oinstitutions = new institutions { institution_id = 0, name = pInstitutionViewModel.name, date_created = DateTime.Now, user_id_created = pInstitutionViewModel.user_id_created }; oRepositorio.Add(oinstitutions); oUnitOfWork.SaveChanges(); }