コード例 #1
0
        public void Assign(VendorProductCategoryAssignModel model)
        {
            if (IsPlaceAssign(model))
            {
                return;
            }

            VendorProductCategoryList = _mapper.Map <VendorProductCategoryList>(model);
            Db.VendorProductCategoryList.Add(VendorProductCategoryList);
        }
コード例 #2
0
 public void Unassigned(VendorProductCategoryAssignModel model)
 {
     VendorProductCategoryList = Db.VendorProductCategoryList.FirstOrDefault(c => c.VendorProductCategoryId == model.VendorProductCategoryId && c.ProductId == model.ProductId);
     Db.VendorProductCategoryList.Remove(VendorProductCategoryList);
 }
コード例 #3
0
 public bool IsPlaceAssign(VendorProductCategoryAssignModel model)
 {
     VendorProductCategoryList = Db.VendorProductCategoryList.FirstOrDefault(c => c.VendorProductCategoryId == model.VendorProductCategoryId && c.ProductId == model.ProductId);
     return(VendorProductCategoryList != null);
 }