Solved

Why place EF model in seperate project

Posted on 2011-03-02
1
553 Views
Last Modified: 2012-05-11
I'm struggling to figure out how to set up my Visual Studio 2010 c# based solution.  I want to create a library to used by both a web application and windows application.  The solution will store data in a SQL Server db via Entity Framework 4.0.

It seems common practice to put the model in a seperate library but how much application logic to add to this?  For example I am downloading data from Paypal so am saving Paypal transactions in the DB.  So in my core library do I have a PaypalSystem (what I communicate with to retrieve the transactions) and put PaypalTransaction in the Model library?  It seems a muddle to me and I think I could use advice or an example!
0
Comment
Question by:canuckconsulting
1 Comment
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
ID: 35018689
If the database to which the EF model maps is shared by multiple applications then it would make sense to move it into a separate library. If not then I don't really see the point since the EF model maps to a particular schema, so is fairly tightly tied to the application that uses it.

Putting your PayPal stuff into it's own library might make sense. That way you make it reusable across applications and you could still make it use your existing EF model if that too was in a separate library. At least then you would have option of more easily detaching the PayPal stuff from the database if you wanted to.  
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now