用户登录
用户注册

分享至

LINQ:获取表列名称

  • 作者: ri赵香奴生紫嫣
  • 来源: 51数据库
  • 2022-12-13

问题描述

使用 LINQ,如何获取表的列名?C# 3.0、3.5 框架

Using LINQ, how can I get the column names of a table? C# 3.0, 3.5 framework

推荐答案

我假设您的意思是使用 LINQ to SQL,在这种情况下,请查看 DataContext.Mapping 属性.这就是我使用的.

I assume you mean by using LINQ to SQL, in which case look at the DataContext.Mapping property. That's what I use.

如果您不是那个意思,也许您可??以详细说明您要实现的目标?

If you don't mean that, perhaps you can elaborate on what you are trying to achieve?

软件
前端设计
程序设计
Java相关