Using Entity Framework the DataLayer is created (DataLayer.dll) The DataLayer.dll contains the data-objects. I need to add some business logic to the class 'person'.
Yes, i know, that I can use partial classes, to add business logic. But in this case (using partial classes) we need to implement it in DataLayer.dll!
I need to uses the BusinessLayer.dll
So the business layer is created (BusinesLayer.dll)
in BusinesLayer.dll we have the file myPerson.cs
using DataLayer;
namespace Businesslayer
{
public class myPerson : DataLayer.Person
public Property String FullName()
{
get {return this.Firstname + " " + this.LastName}
}
}
Actually I need to show the data in the grid, like this
var data=context.Person;
dataGridView1.dataSource = data;
Yes, the context.Person returns a list of Person-Objects and so in the Grid the Column 'FullName' is not available
How to create the List on myPerson-Objects?