there are 4-tier in my project
(1)WPF-UI(Presentation) (refrence of Service client)
(2) Service Client Class Library (Service Refrence of WCF Service)
(3) WCF Service (Refrence of Data Access)
(4) Class Library (Data Access)
All Details Are Inserted,Updated and deleted through Class Library in XML File query in Linq
But Problem is that
I Write this code in Data Access
public List<EmployeeManagementGridCollectionClass> GetData(List<EmployeeManagementGridCollectionClass> employees)
{
try
{
// var list = new Collection<EmployeeManagementGridCollectionClass>();
// XDocument xmlDoc = XDocument.Load(ConfigurationManager.AppSettings["XmlFile"]);
XDocument xmlDoc = XDocument.Load(filename);
employees = (from x in xmlDoc.Descendants("Employee")
select new EmployeeManagementGridCollectionClass()
{
Id = x.Element("Id").Value,
Name = x.Element("Name").Value,
Age = int.Parse(x.Element("Age").Value),
Address = new EmployeeManagementGridCityState()
{
City = x.Element("Address").Element("City").Value,
State = x.Element("Address").Element("State").Value
}
}).ToList();
//Read ListOf Employees
foreach (var item in employees)
{
EmployeeManagementGridCollectionClass empClass = new EmployeeManagementGridCollectionClass();
empClass.Id = item.Id;
empClass.Name = item.Name;
empClass.Age = item.Age;
empClass.City = item.City;
empClass.State = item.State;
emp.Add(empClass);
}
//return employee group to service
return employees;
}
catch (Exception ex)
{
return null;
}
}
here i create a EmployeeManagementGridCollectionClass()
also in access ..but return employee which is a list of employee which
i will Fetch in Presentation And Display that value in Grid..but problem is that how can i return this from service client class through presentation
bcoz there is no refrence through service client through access so i can make a list..how can i return value?