You are declaring your object from with the context when a class of the same name should also live outside of your context, probably in the same namespace as your data context.
This class will allow you to decalre a single Customer object. On writing this I realise that the post is nearly a year old now but this may be helpful to somebody else! I personally renamed my entity set objects within the context class to the plural to avoid confusion, LINQ to SQL does this automatically I believe. On Sunday, June 10, 2012 11:50:22 AM UTC+1, NowOrNever wrote: > > It has been 2 months since i struggled to marry LINQ with SQLite using > DBLinq > > I've generated the .dbml and the .cs files and added the following > references : > > DbLinq.dll > DbLinq.Sqlite.dll > SQLite.NET.dll > System.Data.SQLite.dll > > but what i get from code is strange, > > Main da = new > Main(DALite.Properties.Settings.Default.SHSLiteConnectionString); > > da.Customer is of type "DbLinq.Data.Linq.Table<Customer>" but i want it > to be of the type "Customer" from the .dbml file. > > I can see the class in the .dbml file like > > public partial class Customer : > System.ComponentModel.INotifyPropertyChanging, > System.ComponentModel.INotifyPropertyChanged > > So, why its not giving me this object when am trying with the accessor > da.Customer? > > Please help, am really frustrated here, > > > -- You received this message because you are subscribed to the Google Groups "DbLinq" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/dblinq?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
