I think HttpPostedFileBase
is the wrong property for your model. You probably want instead to have the Image
property as a byte[]
- this is what will be stored in the database. If you require the filename as well, you could just make that a string property on Item
Then, your seed method would look like
...
Image = File.ReadAllBytes("some-image-file.jpg"),
Filename = "some-image-file.jpg"
...