public void AddPercent(PercentageView model)
 {
     using (var percRepo = new PercentageRepository())
     {
         var ingPerc = new Percentage()
         {
             PercentageId = model.PercentageId,
             FeedingStockId = _fStockRepo.GetAll().Find(x=>x.FeedingStockId == model.FeedingStockId).FeedingStockId,
             PercentageRate = model.Percentage,
             FeedingSchemeId = _fSchemeRepo.GetAll().Find(p=>p.FeedingSchemeId==model.FeedingSchemeId).FeedingSchemeId
         };
        percRepo.Insert(ingPerc);
        CalcIngredientCost(model);
     }
 }
 public void Insert(Percentage model)
 {
     _percentageRepository.Insert(model);
 }
 public void Update(Percentage model)
 {
     _percentageRepository.Update(model);
 }
 public void Delete(Percentage model)
 {
     _percentageRepository.Delete(model);
 }