开发者

database independent Silverlight application - possible?

I am developing my application in Silverlight with MVVM pattern support. Now I use Sql server 2008, but I am start thinking about in future use also Oracle and XML as storage for my data. I query with linq to sql.

It is pattern which 开发者_StackOverflowI can use to completely automated and independent from database my application? Where I will only replace few parameters (for example in web.config) to change database, and I write code as little as possible in code behind... Maybe it's chance to connect and implement it in MVVM pattern ?

What do You think ? I work out that in some db i will force to write queries in other ways(which will double or even triple code), cause db have other data types..so it's good idea to create so much independent app?


If you use Entity Framework with RIA Services with Silverlight, you could potentially swap out your data layer to a different database provider very easily (provided it's one that supports ADO.NET Entity Framework).

Using MVVM is a good idea, but really unrelated to your database independence goal. It's more of a pattern for structuring your application as a whole (which I recommend understanding), but the database access is really all part of your model layer in Model-View-ViewModel, so this isn't going to "help" with this aspect.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜