예제 #1
0
        public void Eliminar(int id)
        {
            bad_languages oBadLanguage = new bad_languages
            {
                bad_language_id = id,
            };

            oRepositorio.Delete(oBadLanguage);
            oUnitOfWork.SaveChanges();
        }
예제 #2
0
        public void Modificar(BadLanguageViewModel pBadLanguageViewModel)
        {
            bad_languages obad_languages = oRepositorio.FindById(pBadLanguageViewModel.bad_language_id);

            obad_languages.name = pBadLanguageViewModel.name;

            obad_languages.user_id_modified = pBadLanguageViewModel.user_id_modified;

            obad_languages.date_modified = DateTime.Now;
            oRepositorio.Update(obad_languages);
            oUnitOfWork.SaveChanges();
        }
예제 #3
0
        public void Agregar(BadLanguageViewModel pBadLanguageViewModel)
        {
            bad_languages obad_languages = new bad_languages
            {
                bad_language_id = 0,
                name            = pBadLanguageViewModel.name,
                date_created    = DateTime.Now,
                user_id_created = pBadLanguageViewModel.user_id_created
            };

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