jascam / CodePlexFoo

0 stars 0 forks source link

Saving Files using EF 4.1 Code First #296

Open jascam opened 7 years ago

jascam commented 7 years ago

Read a few things about saving binary files into the database vs the file system and found out that sql server's Filestream is the best of both worlds. The second piece is creating a one to one mapping so the files are stored in a separate table to not have to load the file every time.   Can you provide a sample that uses the latest code first approach to get this going?

Migrated CodePlex Work Item Details

CodePlex Work Item ID: '8600' Vote count: '2'

jascam commented 7 years ago

Hello gsogol,

Thank you for using our code sample request service.

I'd like to confirm with you my understanding of the sample request: Your sample idea is talking about Entity Framework,which is according to your describution. We have a technology lecture about the topic mention above. So I think your sample idea is a wonderful idea. We can integrate it into MVC 3.0 to implement Create, Edit and Delete. So EF speeds up our developing process.I would clear up it and provide a idea description to our term member to check. If it was not covered from other SDK sample , it will be approved and composed by us.

Is my understanding correct? Please let me know if I misunderstood your needs.

Thanks All-In-One Code Framework http://1code.codeplex.com

This comment was posted by orichisonic on 4/6/2011

jascam commented 7 years ago

I guess it doesn't matter what the sample would include in terms of your particular scenario as long as it covers how someone would use EF code first (specifically code first) and saving files. What is the correct approach? Sql server has a new type called Filestream. Can it be used? Should binary files be stored in the database or the file system? Or using Filestream as the hybrid approach? The sample should contain the right way of doing saving binary files and the code first approach.

This comment was posted by gsogol on 4/6/2011

jascam commented 7 years ago

Hello gsogol,

I have discussed with other MSDN forum member about this topic. And I searched its topic with Bing using key word that looks like "Entity Framework+Filestream". I find out a lot of customers concerning with it.Please access websites as follows: http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/f31ee8c0-f205-499f-aef7-64e18f396fff http://social.msdn.microsoft.com/Forums/en/adodotnetentityframework/thread/059fa712-5bab-4d3d-8081-b32d9a08a340

I think that a lot of answers disagree with it using Filestream. It is because that performance isn't worth with doing it. So I suggest that you can use BLOB to do the same order.Thank again for offering so detailed sample idea.

Sincerely All-In-One Code Framework http://1code.codeplex.com

This comment was posted by orichisonic on 4/6/2011

jascam commented 7 years ago

This comment was posted by on 3/30/2012

jascam commented 7 years ago

This comment was posted by on 2/21/2013