8

I am developing a complex web-platform with n-tier architecture. There are two projects inside solution: PresentationLayer.WebSite and APILayer.Restful.

Local database stored in App_Data inside PresentationLayer.WebSite. I have no idea how to implement following actions : (currently I'm workind in debug mode).

  1. Set connection string from Restful project to Presentation Project. Should I use absolute path? They should use the same DB. Of course, in publish moment DB will be placed in some server,but what to do now?
  2. How can I run two projects in the same time? I know how to call one's project's controller from another, but how to run it togetgher? For example: in Chrome I call User\MyProfile?.... (Presentation) and in Firefox i call Api\User\GetUserById... (Rest).

2 Answers 2

17

Right click on your solution and select Properties. In the "Startup Project" select "Multiple startup projects" and set "Action" of your projects to "Start"

Sign up to request clarification or add additional context in comments.

1 Comment

It works, my deep thanks, @Arvin. Could you please advice something about first problem?
2

Connection string should link to one database. Just set direct path to one DB in both projects. In Visual Studio in Solution click propertis and in the Common Propertis tab you have Multiple startup projects and in the Action column you have to set right projects which should on the start.

1 Comment

It really helped me. Thanks, @mati

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.