The following example is a quick proof of concept simply showing how to view the Customer table from the Northwind.dbc.
<connectionStrings>
<add name="northwind"
providerName="System.Data.OleDb"
connectionString="Provider=VFPOLEDB.1;Data Source=**Your Path**\Northwind.dbc;"/>
</connectionStrings>
public class Customer {
public string CustomerId { get; set; }
public string CompanyName { get; set; }
public string ContactName { get; set; }
public string Address { get; set; }
public string City { get; set; }
public string Region { get; set; }
public string PostalCode { get; set; }
public string Country { get; set; }
public string Phone { get; set; }
public string Fax { get; set; }
}
using System.Configuration;
using IQToolkit;
using LinqToVfp;
public class Northwind : AVfpDatabaseContainer {
public Northwind()
: base(ConfigurationManager.ConnectionStrings["northwind"].ConnectionString, null) {
// this will make it so that all command will be logged to the Output windoww
this.Provider.Log = VfpQueryProvider.CreateDebuggerWriter();
public IEntityTable<Customer> Customers {
get { return this.Provider.GetTable<Customer>("Customers"); }
<asp:GridView ID="mainGrid"
runat="server"
DataSourceID="LinqDataSource1"
AllowPaging="True"
AllowSorting="True" />
<asp:LinqDataSource ID="LinqDataSource1"
ContextTypeName="Northwind"
TableName="Customers" />