I have two projects say BusinessLogic (BL) and DataAccess (DL). Now I am passing type as parameter from controller to BL and to DL in the end. Below is the code.
Controller
public ActionResult SomeAction (SomeClassForTable table)
{
bool result = new ServiceInBL.DoSomeStuffWithParameter(table);
}
BL
public class ServiceInBL
{
bool DoSomeStuffWithParameter (SomeClassForTable classForTable)
{
MethodForCrudInDL dl = new MethodForCrudInDL();
return dl.DoSomeStuffWithParameter(classForTable);
}
}
DL
public class MethodForCrudInDL
{
public bool DoSomeStuffWithParameter (SomeClassForTable classForTable)
{
return true;
}
}
SomeClass
public class SomeClassForTable
{
// type members
}
From my controller, I am calling method in BL and from BL, calling method in DL. Now I want to know that how many instances of SomeClassForTable will be created in memory through out the process? Will there be three instances (BL, DL, and the one in controller)?