Hey everyone,
I've got an architecture like the following:
Data (Class Library that handles our Entity Framework stuff)
Components (Middle tier class library that references Data library)
WebOffice (Web Application that references Components library, but NOT Data library)
Now, I have the following snippet of code (this lives inside our Components.Payment.cs; and tblPayment is contained in our Data library.):
public static Payment Retrieve(int id)
{
var t = repository.Retrieve(id);
//the above line returns a tblPayment object
if (t != null)
return new Payment(t);
return null;
}
public static Payment Retrieve(tblPayment tblPayment)
{
return new Payment(tblPayment);
}
After I added this; the WebOffice project is giving the following error:
errorCS0012: The type 'Data.Model.tblPayment' is defined in an assembly that is not referenced. You must add a reference to assembly 'Data, Version=3.5.0.0, Culture=neutral, PublicKeyToken=749b8697f3214861'.
Now, this doesn't quite make sense to me, because the WebOffice project isn't calling the Retrieve(tblPayment tblPayment) method at all. (That's only being used inside the Components library)
Any clue why it would be asking for the Data reference? Do I need to reference every library that a referenced library references? (try saying that 5 times fast...)