?
Solved

Circular dependency with DAL and BLL.

Posted on 2009-05-06
3
Medium Priority
?
750 Views
Last Modified: 2012-06-27
I am getting errors in the BLL and DAL since they both depend on each other.
Error      3      The type or namespace name 'BLL' does not exist in the namespace 'KORE.SIDWebClient' (are you missing an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.DAL\DAL\Tickets\TicketData.cs      9      25      KORE.SIDWebClient.DAL
Error      4      The type or namespace name 'Ticket' could not be found (are you missing a using directive or an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.DAL\DAL\Tickets\TicketData.cs      38      54      KORE.SIDWebClient.DAL
Error      5      The type or namespace name 'DAL' does not exist in the namespace 'KORE.SIDWebClient' (are you missing an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.BLL\BLL\Company\Company.cs      4      25      KORE.SIDWebClient.BLL
Error      6      The type or namespace name 'DAL' does not exist in the namespace 'KORE.SIDWebClient' (are you missing an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.BLL\BLL\Tickets\TicketLogic.cs      5      25      KORE.SIDWebClient.BLL
Error      7      The type or namespace name 'DAL' does not exist in the namespace 'KORE.SIDWebClient' (are you missing an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.BLL\BLL\Lookup\LookupFieldTicketPriority.cs      6      25      KORE.SIDWebClient.BLL
Error      8      The type or namespace name 'DAL' does not exist in the namespace 'KORE.SIDWebClient' (are you missing an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.BLL\BLL\Lookup\LookupFieldTicketAssignedTo.cs      6      25      KORE.SIDWebClient.BLL
Error      9      The type or namespace name 'DAL' does not exist in the namespace 'KORE.SIDWebClient' (are you missing an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.BLL\BLL\Lookup\LookupPriorityLevel.cs      6      25      KORE.SIDWebClient.BLL
Error      10      The type or namespace name 'DAL' does not exist in the namespace 'KORE.SIDWebClient' (are you missing an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.BLL\BLL\Lookup\LookupFieldTicketContactMethod.cs      6      25      KORE.SIDWebClient.BLL
Error      11      The type or namespace name 'DAL' does not exist in the namespace 'KORE.SIDWebClient' (are you missing an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.BLL\BLL\Lookup\LookupFieldTicketRequestType.cs      6      25      KORE.SIDWebClient.BLL
Error      12      The type or namespace name 'DAL' does not exist in the namespace 'KORE.SIDWebClient' (are you missing an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.BLL\BLL\Lookup\LookupFieldTicketServiceImpact.cs      6      25      KORE.SIDWebClient.BLL
Error      13      The type or namespace name 'DAL' does not exist in the namespace 'KORE.SIDWebClient' (are you missing an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.BLL\BLL\Lookup\LookupTypeTicket.cs      6      25      KORE.SIDWebClient.BLL
Error      14      The type or namespace name 'DAL' does not exist in the namespace 'KORE.SIDWebClient' (are you missing an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.BLL\BLL\Lookup\LookupFieldTicketStatus.cs      6      25      KORE.SIDWebClient.BLL
Error      15      The type or namespace name 'DAL' does not exist in the namespace 'KORE.SIDWebClient' (are you missing an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.BLL\BLL\Lookup\LookupFieldTicketAgentFollowup.cs      6      25      KORE.SIDWebClient.BLL
Error      16      The type or namespace name 'DAL' does not exist in the namespace 'KORE.SIDWebClient' (are you missing an assembly reference?)      C:\svn\SIDWEBMYBRANCH\code\KORE.SIDWebClient.BLL\BLL\Lookup\LookupFieldTicketLocationSIMs.cs      6      25      KORE.SIDWebClient.BLL

What do I do?
0
Comment
Question by:mathieu_cupryk
[X]
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
  • 2
3 Comments
 
LVL 6

Expert Comment

by:ViceroyFizzlebottom
ID: 24319425
The easy answer would be to refactor your code to comply with the Isolation of Concerns principle; more specifically to remove any BLL dependencies from your DAL.

In any event though, make sure your references are still good in both projects by ensuring there are no exclamation point icons when you expand your References folder. If the references don't exist (or they are broken as indicated by the exclamation point.)

Another quick way to check is to add a 'using' statement at the top of each .cs file and see if your namespace(s) show up in the context dialog.
0
 
LVL 6

Accepted Solution

by:
ViceroyFizzlebottom earned 2000 total points
ID: 24319446
Whoops, the second paragraph should have continued...

then you should be able to simply re-add the references.
0
 

Author Comment

by:mathieu_cupryk
ID: 24320191
I am still not convince what happens if we make a common layer instead of have two assemblies.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

762 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