示例#1
0
        public void Eliminar(int id)
        {
            educational_institutions oEducationalInstitution = new educational_institutions
            {
                educational_institution_id = id,
            };

            oRepositorio.Delete(oEducationalInstitution);
            oUnitOfWork.SaveChanges();
        }
示例#2
0
        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();
        }
示例#3
0
        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();
        }