locked
Entity Framework with Azure Storage Table RRS feed

  • General discussion

  • I am very new to Entity Framework, currently I stored data in to Azure storage tables by using simple classes. I have heared that Entity Fraework is good option to work with Azure table storage. What is advantage of Entity Fraework over simple classes? I did not found any article or sample code on internet which discribe how to Entity Framework work with azure table storage.. need guidance....
    Tuesday, January 10, 2012 6:27 AM

All replies

  • As far as I know, there is no out-of-the-box way to use Entity Framework with the Windows Azure Table Storage.

    You have to use alternative methods, for instance writing your own Entity Framework Data Provider or using LINQ instead of Entity Framework.


    Sascha Dittmann

    Tuesday, January 10, 2012 9:03 AM
  • Hi Atul,

    Do you want to store your Entity Framework data provider with Windows Azure Table Storage? Currently we may not have the valid APIs so far, Table storage is a deal that working for non-relational data, so if you want to store EF data in Cloud, i suggest you to use SQL Azure for achieving your goals, if your application use SQL Server, i think it will be easy to migrate to SQL Azure, Please refer the following links for more details:

    http://msdn.microsoft.com/en-us/library/windowsazure/ff951633.aspx

    Hope it can help you.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework
    Tuesday, January 10, 2012 4:56 PM
  • As far as I know, entity framework doesn't support the table service. Also the table service is NOT a database, it's something like NoSQL. I think what you have to do manually is to create the entities classes, and then we can use a generic data source class to CRUD the entities. Please check my blog post for the generic class.

    http://blogs.shaunxu.me/archive/2010/03/15/azure-ndash-part-5-ndash-repository-pattern-for-table-service.aspx

    Wednesday, January 11, 2012 2:24 AM
  • As far as I know, entity framework doesn't support the table service. Also the table service is NOT a database, it's something like NoSQL. I think what you have to do manually is to create the entities classes, and then we can use a generic data source class to CRUD the entities. Please check my blog post for the generic class.

    http://blogs.shaunxu.me/archive/2010/03/15/azure-ndash-part-5-ndash-repository-pattern-for-table-service.aspx


    Yes I am currently using same way for storing data by creating classes. As Arwind says Azure SQL is really good option for Relational data. But I am currently working with non-relational data. So I found that currently there is no way for Entity Framework to directly interact with Azure Storage like it works with SQL/Azure SQL DB.. am I right?
    Wednesday, January 11, 2012 5:53 AM
  • Because EF is designed to work with relational database, so if you want to use table storage with entities, i suggest you use WCF Data Service, table storage can work well with Data Service.

    Here is a All-In-One Code Framework sample shows how to access table storage with WCF Data Service.

    http://code.msdn.microsoft.com/windowsazure/CSAzureTableStorageWCFDS-2355159b

    Hope it can help you.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework
    Wednesday, January 11, 2012 6:10 AM