public void Eliminar(int id) { bad_languages oBadLanguage = new bad_languages { bad_language_id = id, }; oRepositorio.Delete(oBadLanguage); oUnitOfWork.SaveChanges(); }
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(); }
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(); }