public void InsertProduct(ProductModel productModel) { var prodcut = Mapper.Map<Product>(productModel); this.ShopContext.Products.Add(prodcut); this.ShopContext.SaveChanges(); }
public void 當執行轉換為ProductModel() { this.model = Mapper.Map<ProductModel>(this.inputModel); }