Reputation: 71
I want to build a program for Windows and then reproduce an identical app to Android and iOS.
My concern is which is the best database type (SQL, Access or SQLite) to use on both, so that I will not have to reproduce the database.
Or should I use a another approach and use different database type for each?
Upvotes: 0
Views: 770
Reputation: 16884
Better approach you can make is:
1) Use just one database engine. SQL Server can be best option you have, depending of complexity and data size you will have. Start with SQL Server Express fit must of options.
2) Use a Middleware Layer. You can use Webservices or MVC Api to communicate betwwen you apps and your DataLayer (You can use Entity Framework as DataLayer)
If you use Mvc Api you can create rest calls, this means you will can use it very easy in Windows Forms, Android or IOS with out change any code in Data Layer or Mvc Api. All changes you need made must be in Presentation Layer.
Check some references:
https://docs.asp.net/en/latest/tutorials/first-web-api.html
https://www.youtube.com/watch?v=aQ8Mu7-s_Xk
http://hintdesk.com/how-to-call-asp-net-web-api-service-from-android/
http://instinctcoder.com/how-to-call-asp-net-web-api-from-android-studio/
http://www.asp.net/web-api/overview/advanced/calling-a-web-api-from-a-net-client
Upvotes: 1