I'm using Entity Framework 5 and using the code-first model. I'm trying to create a model that represents a PDF and some associated data fields. For example:
Receipt
---------
Id
Date
Retailer
Total
FilePath
I recently transitioned from a role working with Django. Django's ORM allows me to easily add a file field type and it will store the path in the database and the file in the file system. It seems like EF can be manually coded around to do something like that according to File Upload ASP.NET MVC 3.0. I built a prototype based on this artice, but it seems like a waste of time to add this code to each create and update action in controllers.
I'm assuming there's another way to easily model this and I just haven't found it in the docs. I'm even willing to consider something that sticks the file into the database itself for now. I just want something I can do quickly and not have to add a bunch of bolier plate type code when auto generating the views and controllers based on the model. I have several of these tables that model a file and specific additional data.
*Note - This is for a prototype. Something unlikely to see production in it's current form.