如何从Access表生成.net类

时间:2022-08-11 15:41:04

Is there any way that I can get my .NET classes to be automatically generated from the tables in Access?

有什么方法可以让我的.NET类从Access中的表自动生成?

Anything like ORM available?

有什么像ORM可用吗?

4 个解决方案

#1


You can either use an ORM such as nHibernate, here's a partial older list of ORM's http://www.theserverside.net/news/thread.tss?thread_id=29914

您可以使用ORM,例如nHibernate,这是ORM的部分旧列表http://www.theserverside.net/news/thread.tss?thread_id=29914

Or you could use code generation techniques, such as CodeSmith http://www.codesmithtools.com/

或者您可以使用代码生成技术,例如CodeSmith http://www.codesmithtools.com/

#2


You can add a DataSet to your project (Add New Item) and then drag-and-drop your tables onto the dataset-view. This will automatically generate classes for the tables.

您可以将DataSet添加到项目中(添加新项),然后将表拖放到数据集视图中。这将自动为表生成类。

#3


NHibernate is supported on Microsoft Access: http://www.hibernate.org/

Microsoft Access支持NHibernate:http://www.hibernate.org/

LINQ to SQL and Entity Framework do not support Access.

LINQ to SQL和Entity Framework不支持Access。

#4


MyGeneration got some Templates for Automatically generate Classes from Access Tables.

MyGeneration获得了一些用于从Access表自动生成类的模板。

http://www.mygenerationsoftware.com/portal/default.aspx

#1


You can either use an ORM such as nHibernate, here's a partial older list of ORM's http://www.theserverside.net/news/thread.tss?thread_id=29914

您可以使用ORM,例如nHibernate,这是ORM的部分旧列表http://www.theserverside.net/news/thread.tss?thread_id=29914

Or you could use code generation techniques, such as CodeSmith http://www.codesmithtools.com/

或者您可以使用代码生成技术,例如CodeSmith http://www.codesmithtools.com/

#2


You can add a DataSet to your project (Add New Item) and then drag-and-drop your tables onto the dataset-view. This will automatically generate classes for the tables.

您可以将DataSet添加到项目中(添加新项),然后将表拖放到数据集视图中。这将自动为表生成类。

#3


NHibernate is supported on Microsoft Access: http://www.hibernate.org/

Microsoft Access支持NHibernate:http://www.hibernate.org/

LINQ to SQL and Entity Framework do not support Access.

LINQ to SQL和Entity Framework不支持Access。

#4


MyGeneration got some Templates for Automatically generate Classes from Access Tables.

MyGeneration获得了一些用于从Access表自动生成类的模板。

http://www.mygenerationsoftware.com/portal/default.aspx