Exemplo n.º 1
0
        public int CreatePersonalProtectiveEquipmentCategoryTypeModel(PersonalProtectiveEquipmentCategoryTypeModel PersonalProtectiveEquipmentCategoryTypeModel)
        {
            var repository = new PersonalProtectiveEquipmentCategoryTypeModelRepository(_db);
            repository.Add(PersonalProtectiveEquipmentCategoryTypeModel);
            repository.Save();

            return PersonalProtectiveEquipmentCategoryTypeModel.Id;
        }
Exemplo n.º 2
0
 public void UpdatePersonalProtectiveEquipmentCategoryTypeModel(PersonalProtectiveEquipmentCategoryTypeModel personalProtectiveEquipmentCategoryTypeModel)
 {
     var repository = new PersonalProtectiveEquipmentCategoryTypeModelRepository(_db);
     repository.Edit(personalProtectiveEquipmentCategoryTypeModel);
     repository.Save();
 }
Exemplo n.º 3
0
 public ICollection<PersonalProtectiveEquipmentCategoryTypeModel> SearchPersonalProtectiveEquipmentCategoryTypeModels(string searchTerm)
 {
     var repository = new PersonalProtectiveEquipmentCategoryTypeModelRepository(_db);
     var models = repository.SearchCategoryTypeModels(searchTerm);
     return models;
 }
Exemplo n.º 4
0
 public ICollection<PersonalProtectiveEquipmentCategoryTypeModel> GetPersonalProtectiveEquipmentCategoryTypeModels()
 {
     var repository = new PersonalProtectiveEquipmentCategoryTypeModelRepository(_db);
     return repository.GetAllWithChildren().ToList();
 }
Exemplo n.º 5
0
 public PersonalProtectiveEquipmentCategoryTypeModel GetPersonalProtectiveEquipmentCategoryTypeModel(int Id)
 {
     //shift the include statements to the repository method
     var repository = new PersonalProtectiveEquipmentCategoryTypeModelRepository(_db);
     return repository.FindBy(c => c.Id == Id).Include(c => c.PersonalProtectiveEquipmentCategoryTypeModelInventory)
                                              .Include(c => c.PersonalProtectiveEquipmentCategoryType).SingleOrDefault();
 }
Exemplo n.º 6
0
 public void DeletePersonalProtectiveEquipmentCategoryTypeModel(int Id)
 {
     var repository = new PersonalProtectiveEquipmentCategoryTypeModelRepository(_db);
     repository.Delete(Id);
     repository.Save();
 }