How to pass data from Business layer to UI layer

  • Thread starter Thread starter zleug
  • Start date Start date
Z

zleug

Guest
Hi All.

In my three layer WPF project I have problem to pass data from Business layer to UI layer. In Business layer I have static method in class EmployeeFactory

public static IEnumerable<v_Employees> GetEmployees(Result search)
{
using (Model1 context = new Model1())
{
var restdg = context.v_Employees.AsNoTracking().ToArray();

.....

return restdg;
}
}

where v_Employees entity table

And in UI layer I try to create property and populate DataGrid using this entity table

public v_Employees DataE { get; set; }


Employees_DG.ItemsSource = EmployeeFactory.GetEmployees(search);

In this line at the right Visual Studio point error and to add Data layer to reference. But I would like to link Data layer to Business layer and Business layer to UI layer. What need to do to solve the problem?

Continue reading...
 
Back
Top