public void Assign(VendorProductCategoryAssignModel model)
        {
            if (IsPlaceAssign(model))
            {
                return;
            }

            VendorProductCategoryList = _mapper.Map <VendorProductCategoryList>(model);
            Db.VendorProductCategoryList.Add(VendorProductCategoryList);
        }
 public void Unassigned(VendorProductCategoryAssignModel model)
 {
     VendorProductCategoryList = Db.VendorProductCategoryList.FirstOrDefault(c => c.VendorProductCategoryId == model.VendorProductCategoryId && c.ProductId == model.ProductId);
     Db.VendorProductCategoryList.Remove(VendorProductCategoryList);
 }
 public bool IsPlaceAssign(VendorProductCategoryAssignModel model)
 {
     VendorProductCategoryList = Db.VendorProductCategoryList.FirstOrDefault(c => c.VendorProductCategoryId == model.VendorProductCategoryId && c.ProductId == model.ProductId);
     return(VendorProductCategoryList != null);
 }