How to create / extend a constructor for Visual Studio

I just finished a quick introduction to Linq2Sql, and I decided to try my hand. Unfortunately, the dbml developer only supports the SqlServer and SqlClient providers.

After reading it, I found that I had to manually code my classes to make Linq2Sql for other data providers such as SQLite (which I use very often).



I wanted to know:

  • Are there any resources from which I can learn how to extend the dbml constructor in Visual Studio?
  • If there is no way to extend the dbml constructor, how can I create custom developers of code generation for visual studio?
+4
source share
1 answer

You do not need to create or extend a constructor. All you need is a valid DBML file.

I recommend checking out DbLinq and the source code:

[DbLinq] allows you to use Linq, as well as DBML file generation using databases other than MS, such as MySQL, PostgreSQL, Oracle, Ingres, SQLite, FireBird and SQL Server

By the way, do you focus on a specific database server? (DbLinq is probably not the best choice in your case, as it does not seem to be supported since some time, and more and more LinqToSql / Entities providers are provided by providers ...)

+1
source

Source: https://habr.com/ru/post/1335734/


All Articles