Basically what I have at the moment is a ASP.NET MVC project made database first the tables take alpha numeric input but I think it would be pretty nifty to have a file upload so I can insert a picture into the database so I created a table in SQL server with an ID field and an image field with the data type image.
When i add this model and create my controller and views based on that model it doesn't create the label or editor for this field, I used DataAnnotations to give it the DataType upload but I can't find a way of actually uploading the file I tried this which works for normal input but nothing shows up is there a way of having a @HTML.FileUploadFor(model => model.Vehicle) or something along those lines.
This is what I've tried
<div class="editor-label">
@Html.LabelFor(model => model.Vehicle)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.Vehicle)
@Html.ValidationMessageFor(model => model.Vehicle)
</div>
This is my model
public partial class VehicleImage
{
public int Vehicle_ID { get; set; }
[DataType(DataType.Upload)]
public byte[] Vehicle { get; set; }
}