c# - How to make a WPF Desktop application accessible over a network -


i designing wpf application connects ms sql server database using entity framework.

the application reads data excel file , saves records database. next requirement has come application should accessible multiple users @ same time (company network) users can see data in database , query/update whenever required.

what thinking is, need put database on central machine should on company's internal network , application should connect database , allow users perform operations.

what changes require 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=&quot;data source=test-dell;initial catalog=tpms;integrated security=true;multipleactiveresultsets=true;app=entityframework&quot;" providername="system.data.entityclient" />   </connectionstrings> 

and other changes need implement/keep in mind application work multiple users simultaneously?

p.s: application "any cpu" targeted framework 4.5. right desktop based in future might make web based, want desktop based is. please help.

update this view of solution explorer. tmps main application. tpms.data contains business logic , methods provides interaction database though entity framework. tpms.entities has database tables entity classes.

this approach called 3-tier architecture. can implement wcf tcp/ip hosted on window. host database interaction business logic on other server machine , client consume these apis on other machine.

you need flowing:

  • create service(window) using wcf.
  • host it.
  • generate proxy (interface or contract).
  • distribute proxy clients application needs call , use apis.

you can create architecture of application below:

  • deployed on server machine:

    a) data base access layer (interact database). b) business logic layer (it methods of data base access layer). c) service layer (create wcf services , call business logic methods here). d) host these server machine.

  • client machine - a) create proxy class using .svcutil tool b) use proxy class client machine consuming services (apis)

reference:

host wcf service


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -