Ejemplo n.º 1
0
        public void Eliminar(int id)
        {
            education_levels oEducationLevel = new education_levels
            {
                education_level_id = id,
            };

            oRepositorio.Delete(oEducationLevel);
            oUnitOfWork.SaveChanges();
        }
Ejemplo n.º 2
0
        public void Modificar(EducationLevelViewModel pEducationLevelViewModel)
        {
            education_levels oeducation_levels = oRepositorio.FindById(pEducationLevelViewModel.education_level_id);

            oeducation_levels.name = pEducationLevelViewModel.name;

            oeducation_levels.user_id_modified = pEducationLevelViewModel.user_id_modified;

            oeducation_levels.date_modified = DateTime.Now;
            oRepositorio.Update(oeducation_levels);
            oUnitOfWork.SaveChanges();
        }
Ejemplo n.º 3
0
        public void Agregar(EducationLevelViewModel pEducationLevelViewModel)
        {
            education_levels oeducation_levels = new education_levels
            {
                education_level_id = 0,
                name            = pEducationLevelViewModel.name,
                date_created    = DateTime.Now,
                user_id_created = pEducationLevelViewModel.user_id_created
            };

            oRepositorio.Add(oeducation_levels);
            oUnitOfWork.SaveChanges();
        }