MVC3/EF4.1 Binding HttpPostedFileBase to model and adding to DB
问题 I have an ActionResult which binds data to the model and adds it the the DB. Now what I want, is to have a file uploader, and the ActionResult to store the files and adding their FileName to the DB (so I can show the files/images at a later point). What is the best approach? Here is what I got so far (It can store the files, but im not sure how intelligent EF is, and how complex the datatypes can be): The model class: public class Annonce { public int Id { get; set; } public string Company {