Another Question on how to Use CSLA

Another Question on how to Use CSLA

Old forum URL: forums.lhotka.net/forums/t/728.aspx


vicky_iit posted on Wednesday, July 26, 2006

i am using CSLA.Net as my business framework for my app. now The there are 3 projects(all class libraries) as of now:

1. CSLA Framework

2. Business Layer

3. BusinessService Interface

#2 references #1 and # 3 references # 2. But i cant compile this as I need to reference both 1 and 2 in 3 since 2 depends on 1. Though things will compile but is this the right thing to do? means letting yr service interface know about the BL framework too?

Also, one more thing: if i use a web service UI instead of service interface, i dont need to reference the framework as Web compilation model works different than class libraries and it copies and references #1 automatically.

And there is a post which says this is a bug in C# compiler:
http://www.dotnet247.com/247reference/msgs/56/284237.aspx

RockfordLhotka replied on Wednesday, July 26, 2006

I don't see the problem. If your 3 was any type of UI, you'd just have it reference 1 and 2. Of course 2 references 1 as well.

The only reason 3 needs to reference 1 is because the JIT compiler needs you to do that in order to successfully load types from 2. It is the way the .NET type loader and JIT compiler work.

Copyright (c) Marimer LLC