예제 #1
0
        public void Eliminar(int id)
        {
            institutions oInstitution = new institutions
            {
                institution_id = id,
            };

            oRepositorio.Delete(oInstitution);
            oUnitOfWork.SaveChanges();
        }
예제 #2
0
        public void Modificar(InstitutionViewModel pInstitutionViewModel)
        {
            institutions oinstitutions = oRepositorio.FindById(pInstitutionViewModel.institution_id);

            oinstitutions.name = pInstitutionViewModel.name;

            oinstitutions.user_id_modified = pInstitutionViewModel.user_id_modified;

            oinstitutions.date_modified = DateTime.Now;
            oRepositorio.Update(oinstitutions);
            oUnitOfWork.SaveChanges();
        }
예제 #3
0
        public void Agregar(InstitutionViewModel pInstitutionViewModel)
        {
            institutions oinstitutions = new institutions
            {
                institution_id  = 0,
                name            = pInstitutionViewModel.name,
                date_created    = DateTime.Now,
                user_id_created = pInstitutionViewModel.user_id_created
            };

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