Hi all & thanks in advance for any help you can offer.
I'm developing an app (WPF, MVVM, WCF services, EF6 and an MS SQL Exp DB) that uses data from another proprietary app, my problem is that the other App I'm working with uses an MS Access DB which means I need to use an alternative to EF for my data layer for access to the other apps data.
That said I've done a bit of research and had a bit of a play and am pretty sure I'm on the right track using DataSets, DataTables & DataAdapters for the data layer for the MS Access DB. From what I found its not good practice to return a DataSet from the WCF service so in the service I plan to use something like this which does not return the dataset itself;
[OperationContract]
public IEnumerable<Customer> GetEvents()
{
using (var context = new DataSet())
{
var result = context.Customers.ToList();
result.ForEach(e => context.Detach(e));
return result;
}
}
Now my question is if I was using the EF it would contain all the tables from the DB so if I am using a DataSet should that dataset hold all the tables from the db or should I have a dynamic DataSet that only holds the tables & relationships for the functionality I'm working with IE if it was a customer masterfile screen that includes historical sales data the datast would have the Customer, Sales, Stock tables.
As I said Thanks for any help.