I am designing a WPF application that connects to a MS SQL Server database using Entity Framework.
The application reads data from a Excel file and saves the records to the database. Now the next requirement has come that this application should be accessible to multiple users at the same time (company network) so that all users can see the data in database and query/update it whenever required.
What I am thinking is, all I need to do is just put the database on a central machine which should be on the company's internal network and my application should connect to that database and allow users to perform the operations.
What changes do I require to this current connection string?
<connectionStrings> <add name="TPMSContext" connectionString="metadata=res://*/TPMSModel.csdl|res://*/TPMSModel.ssdl|res://*/TPMSModel.msl;provider=System.Data.SqlClient;provider connection string="data source=Test-DELL;initial catalog=TPMS;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" /> </connectionStrings>
And what are other changes that I need to implement/keep in mind for my application to work for multiple users simultaneously?
P.S: My application is "ANY CPU" with targeted framework as 4.5. Right now its Desktop based but in future we might make it web based, but for now we just want it to be Desktop based as it is.
This is the view of my solution explorer. TMPS is my Main application. TPMS.Data contains my business logic and methods that provides interaction with the database though Entity Framework. TPMS.Entities has the database tables as entity classes:
This approach is called 3-tier architecture. You can implement it by WCF TCP/IP hosted on the window. You will host your Database interaction business logic on other server machine and client will consume these APIs on the other machine.
You need the flowing:
You can create architecture of your application like below:
Deployed on the server machine:
a) Data base Access layer (Interact with database). b) Business Logic Layer (It will methods of Data base Access layer). c) Service layer (Create WCF Services and call business logic methods here). d) Host these into server machine.
Client Machine -
a) Create proxy class by using .
b) use this proxy class to client machine for consuming services (APIs)