I need to create several applications that all share a Microsoft SQL Server database. These include ASP.NET web applications, WPF desktop applications, and probably the odd console app every now and then.
I'd like to use the ADO.NET Entity Framework for data access, extend its objects for my business logic, and bind those objects to controls in my UI.
How can I do this in each of my applications without repeating myself too much? If the database schema or my business logic changes, then I want an easy (or automatic) way to update all my applications.
How should I architect this system?
Update: I've asked follow-up questions...
for that I would recommend creating a Visual Studio Solution that contains multiple Projects. Your DAL would be contained within its own project then for the other projects that need to make use of that functionality, create a Project Reference back to the DAL project.
Hope this helps!
adamalex's idea is sound. depending on your setup, another favoured approach is to take the common projects separate, compile and then have your other projects reference this compiled dll. it is up to you if they reference the latest build of this dll or a specific version of it. perhaps you don't want some projects having to keep up all the time.
Maybe you can use webservices to centralize the database access / logic...
As seen in the answers from link (SOA / WebServices / Remoting)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With