public void CreatePersonalProtectiveEquipmentTransaction(PersonalProtectiveEquipmentTransaction personalProtectiveEquipmentTransaction)
 {
     var repository = new PersonalProtectiveEquipmentTransactionRepository(_db);
     repository.Add(personalProtectiveEquipmentTransaction);
     repository.Save();
 }
        public ICollection<PersonalProtectiveEquipmentTransaction> GetPersonalProtectiveEquipmentTransactionsByPerson(string TRN)
        {
            var repository = new PersonalProtectiveEquipmentTransactionRepository(_db);
            var x = repository.FindBy(c => c.TransactionPartyIdNumber == TRN)
                                                 .Include(c => c.TransactionType)
                                                 .Include(c => c.PersonalProtectiveEquipmentCategoryTypeModel)
                                                 .Include(c => c.PersonalProtectiveEquipmentCategoryTypeModel.PersonalProtectiveEquipmentCategoryType);

            return x.ToList();
        }
 public PersonalProtectiveEquipmentTransaction GetPersonalProtectiveEquipmentTransaction(int Id)
 {
     var repository = new PersonalProtectiveEquipmentTransactionRepository(_db);
     return repository.FindBy(c => c.Id == Id).Include(c => c.TransactionType.TransactionPartyType).SingleOrDefault();
 }
 public ICollection<PersonalProtectiveEquipmentTransaction> GetPersonalProtectiveEquipmentTransactions(bool? includeChildEntities = null)
 {
     var repository = new PersonalProtectiveEquipmentTransactionRepository(_db);
     if (includeChildEntities.HasValue && includeChildEntities.Value)
     {
         var transactionsWithChildren = repository.GetAllWithChildren();
         return transactionsWithChildren.ToList();
     }
     else
     {
         return repository.GetAll().ToList();
     }
 }
 public void DeletePersonalProtectiveEquipmentTransaction(int Id)
 {
     var repository = new PersonalProtectiveEquipmentTransactionRepository(_db);
     repository.Delete(Id);
     repository.Save();
 }