Say i have a Database table name Employee and has 4 columns like ID, Firstname, Lastname,Email etc. That is, there is no Fullname Column but we need to display it on the List Form. So what we usually do?
We fetch all data; iterate over the list of data to make the Fullname String right?
But there is another nice way to do that, if we get the property Fullname like Firstname or Lastname then it might help us a lot for further processing.
What I did for that, I have an Employee class in my dbml file. So I have created a partial Class name Employee in which I have define a Property Fullname as read-only. So when we get the Object Employee we will get the property Fullname. Have a look on code please.
public partial class Employee
public string FullName
StringBuilder sb = new StringBuilder();
Very very easy stuff!!