简体   繁体   中英

How to Create/Manage a WCF Project in a VS2013 App Using WPF anf MVVM pattern

I have fiew question about the WCF Service Library. I'm using Visual Studio 2013 WPF and the MVVM Pattern.

So in my Solution I have multiple projects and 1 of em is the WCF Service Library. In my Library I have a Service for Users

my Questions are :

  1. Is it Better to separate the WCF Service Library in an another Solution ?
  2. Where should I create my UserModel ? (Right now it's in my User Project not the Service Library)
  3. How should I reference my Service in my Projects
  4. Where and How should I store my SQL DB Connection String, how should I wrap the sensitive data like the Password ?
  5. Should my Services be placed on the Server ?

Also, If you have any good Tutorials for WPF MVVM WCF Services that would greatly help.

Thanks all

  1. Yes: I would create a separate WCF application and run that in parrellel with your WPF app.
  2. I'm not sure what a user model is.
  3. You add a service reference to your exe or class library. In there, you specify the endpoint address.
  4. Consider using Entity Framework as well.
  5. Yes or a Windows Service

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM