Saving images to database with asp.net mvc 4 + Entity Framework
问题 I have this: Model: public string Picture { get; set; } [Column(TypeName = "image")] public byte[] Image { get; set; } [Display(Name = "Display profile Image")] public bool DisplayItem { get; set; } View: <div class="editor-label"> @Html.LabelFor(model => model.DisplayItem) </div> <div class="editor-field"> @Html.EditorFor(model => model.DisplayItem) @Html.ValidationMessageFor(model => model.DisplayItem) </div> <div class="editor-label"> @Html.LabelFor(m => m.Image) </div> <input type="file"