问题
Framework: In an asp.net MVC 4 project I'm using EntityFramework 5 for the first time and have chosen to use "Model First" due to the ease of model implementation (the ability to generate the db schema once the model is created using the designer). Also, I've chosen to use SQLCE opposed to SQLExpress based on the lightweight nature and requirements of the project.
Question: What is the best property Type selection in the .edmx designer for saving images in the compact sql database? I'm thinking I could convert the image to binary (as I've done in previous web forms projects) but there's no option for varbinary(max).
回答1:
EDIT You can define Property Type to "binary" and Map SqlType like "image"
来源:https://stackoverflow.com/questions/15329877/entityframework-5-model-first-and-sqlce-what-type-property-to-store-an-imag