C# where does the dbml file come from?

前端 未结 5 1372
你的背包
你的背包 2020-12-29 03:31

I am currently learning C# and LINQ. I have lots of questions about them. Basically, I need a step by step tutorial.

  1. I suppose the dbml file is

5条回答
  •  天命终不由人
    2020-12-29 04:12

    The DBML file is not related to the database server at all. It's a completely client side thing. It's essentially a set of information about your tables in the database and how you're going to map them to .NET objects.

    Of course, you can drag a table from a database and have Visual Studio infer some information for you automatically, but changing the file will not affect the database. You can create a DBML file from scratch without any database too.

    Internally, the DBML file is simply an XML file that's fed into a custom tool by Visual Studio and generates .cs files representing the LINQ object model for your database from it.

提交回复
热议问题