public bool DeleteCommodityGrade(CommodityGrade commodityGrade)
 {
     if (commodityGrade == null) return false;
     _unitOfWork.CommodityGradeRepository.Delete(commodityGrade);
     _unitOfWork.Save();
     return true;
 }
        public static CommodityGradeViewModel BindCommodityGradeViewModel(CommodityGrade commodityGrade)
        {
            return new CommodityGradeViewModel()
                       {
                         CommodityGradeID=commodityGrade.CommodityGradeID,
                         Name=commodityGrade.Name,
                         Description = commodityGrade.Description

                       };
        }
        public static CommodityGrade BindCommodityGrade(CommodityGradeViewModel commodityGradeViewModel, CommodityGrade commodityGrade = null)
        {
            return commodityGrade ?? new CommodityGrade()
            {
              CommodityGradeID=commodityGradeViewModel.CommodityGradeID,
              Name=commodityGradeViewModel.Name,
              Description=commodityGradeViewModel.Description

            };
        }
 public bool EditCommodityGrade(CommodityGrade commodityGrade)
 {
     _unitOfWork.CommodityGradeRepository.Edit(commodityGrade);
     _unitOfWork.Save();
     return true;
 }