public void Eliminar(int id) { educational_institutions oEducationalInstitution = new educational_institutions { educational_institution_id = id, }; oRepositorio.Delete(oEducationalInstitution); oUnitOfWork.SaveChanges(); }
public void Modificar(EducationalInstitutionViewModel pEducationalInstitutionViewModel) { educational_institutions oeducational_institutions = oRepositorio.FindById(pEducationalInstitutionViewModel.educational_institution_id); oeducational_institutions.name = pEducationalInstitutionViewModel.name; oeducational_institutions.user_id_modified = pEducationalInstitutionViewModel.user_id_modified; oeducational_institutions.date_modified = DateTime.Now; oRepositorio.Update(oeducational_institutions); oUnitOfWork.SaveChanges(); }
public void Agregar(EducationalInstitutionViewModel pEducationalInstitutionViewModel) { educational_institutions oeducational_institutions = new educational_institutions { educational_institution_id = 0, name = pEducationalInstitutionViewModel.name, date_created = DateTime.Now, user_id_created = pEducationalInstitutionViewModel.user_id_created }; oRepositorio.Add(oeducational_institutions); oUnitOfWork.SaveChanges(); }