public void Eliminar(int id) { merit_ranges oMeritRange = new merit_ranges { merit_range_id = id, }; oRepositorio.Delete(oMeritRange); oUnitOfWork.SaveChanges(); }
public void Modificar(MeritRangeViewModel pMeritRangeViewModel) { merit_ranges omerit_ranges = oRepositorio.FindById(pMeritRangeViewModel.merit_range_id); omerit_ranges.name = pMeritRangeViewModel.name; omerit_ranges.user_id_modified = pMeritRangeViewModel.user_id_modified; omerit_ranges.upper_limit = pMeritRangeViewModel.upper_limit; omerit_ranges.lower_limit = pMeritRangeViewModel.lower_limit; omerit_ranges.url_image = pMeritRangeViewModel.url_image; omerit_ranges.description = pMeritRangeViewModel.description; omerit_ranges.date_modified = DateTime.Now; oRepositorio.Update(omerit_ranges); oUnitOfWork.SaveChanges(); }
public void Agregar(MeritRangeViewModel pMeritRangeViewModel) { merit_ranges omerit_ranges = new merit_ranges { merit_range_id = 0, name = pMeritRangeViewModel.name, upper_limit = pMeritRangeViewModel.upper_limit, lower_limit = pMeritRangeViewModel.lower_limit, url_image = pMeritRangeViewModel.url_image, date_created = DateTime.Now, user_id_created = pMeritRangeViewModel.user_id_created, description = pMeritRangeViewModel.description }; oRepositorio.Add(omerit_ranges); oUnitOfWork.SaveChanges(); }