Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Why place EF model in seperate project

Posted on 2011-03-02
1
557 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 our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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 …
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

809 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