(I'm gonna ask 2 question please).
We use 3 layers: Bl , Dal , UI.
We didn't want to build one big BL
, DAL
for All Objects.
So we created this structure both for Agents
and Leads
.
Now lets say I should write a method :
public Agent GetAgentByLead(Lead leadObj)
{
}
Question #1
Where does this function should reside on : AgentsBL
or LeadsBL
?
Question #2
Lets say I want to use Entity Framework.
A query can be :
var activeAgents= context.Agents.Where(c => c.ACTIVE).ToList();
This line can be executed in myPage.aspx.cs
file.
so where are the layers here ? Where will context resides ?
I just dont see how EF deals with layers ( like my first question )
Any help please?