I am storing my data in the Azure table. In the current working code I put the tablestorage connection in the controller. But the boss doesnt seem happy with it. and we need to abstract the database in a way that we the controller is independent how it fetches inputs. In the future we might switch to using normal Sql. that is why the boss surely wants this abstraction. to make the migration easier!
any help or tip. tnx
Edited….
Looking for the best practise while using azure table storage. I really need to make a clean controller and use only function calls. Looking for any tutorials.
tnx in advance
You should be careful when abstracting out Windows Azure Table Storage, especially when you would use that same abstraction for databases. Table storage isn’t a database.
Databases allow you to use transactions, but “transactions” in table storage are totally different (limited to 100 records on a single partition for example). Databases have indexes, but in table storage you’ll need to optimize using partition and row keys. A table storage entity cannot be larger than 1MB, queries are limited in time, … (more info here: http://msdn.microsoft.com/en-us/library/windowsazure/dd179338.aspx)
If you hide all this in an abstraction layer and make it work as if it could be a database you might not be able to take full advantage of the table storage’s features. If you still need to create an abstraction, make one that covers all the table storage functionalities and handles its limits.
A good starting point would be to look at the AzureToolkit: http://azuretoolkit.codeplex.com/SourceControl/changeset/view/46c9fb9ff82a#Source%2fAzureToolkit%2fIAzureTable.cs