I’m used to work with ASP.NET and I have no problems there, but now I need to create a C# Console application and something is wrong.
- I create console application
- Add new item to project (Local database)
- Fill in some basic data (id, name)
But when I create LINQ to SQL Class and drag my table to it like I do in ASP.NET I get error
The selected objects use an unsupported data provider
What am I doing wrong here, how can I make my work with databases using C# Console/Windows application as fast and easy as with ASP.NET applications?
The database driver / provider needs to allow for the usage of linq. If you are using a simple sqlite db, I would recommend using the DBLinq provider.
If you are using Microsoft’s lightweight database (Sql Compact) then I believe this article maybe helpful.