相关疑难解决方法(0)

实体框架5代码首先添加图像

我正在用mvc4和实体框架5编写一个非常小的应用程序.

我想为产品添加产品,商店和图像.

我有一个模特

  [Table("CatalogItem")]
public class CatalogItemModel
{
    [Key]
    public int CatalogItemId { get; set; }

    public string Description { get; set; }

    public double Price { get; set; }

    public int ProductCount { get; set; }

    public string Size { get; set; }

    public string Sku { get; set; }

    [Column(TypeName = "image")]


    public byte[] Image { get; set; }

    [Display(Name = "Display Catalog Item")]
    public bool DisplayItem { get; set; }
}
Run Code Online (Sandbox Code Playgroud)

我的控制器.这永远不会受到打击.

 [HttpPost]
    public ActionResult Create(CatalogItemModel catalogitemmodel) …
Run Code Online (Sandbox Code Playgroud)

c# asp.net-mvc entity-framework

8
推荐指数
1
解决办法
1万
查看次数

标签 统计

asp.net-mvc ×1

c# ×1

entity-framework ×1