0

I want to build Web API project using with seperate Model class library. But I have confused about ClassLibrary and PortableClassLibrary. Which library is perfect for web api project.

1 Answer 1

1

Portable class libraries help you if you are developing cross platform apps / libraries. For an example if you are developing Windows Phone / Windows 8 / WPF / Silverlight apps and these apps consume data through Web API that you are developing right now, most probably you want to use same model classes you are having in your Web API project. In such scenario portable libraries will help you reduce the time and costs of developing and testing code.

But if you are developing your API for third parties that you are not aware of (do not have control over), or you want to consume these APIs from non .NET platforms (such as Web pages , android, iOS etc..) then you would not want your model library to be portable.

Follow this MSDN article for more details

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

Comments

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.