我创建了一个包含常用变量的通用DLL.我有用户定义的字段作为占位符,因此我们可以保存客户特定的数据.此dll将用于客户端特定的应用程序.
如何将这些通用变量映射到相关的sql表字段,以便我们可以操作自定义数据库?我想避免编写自定义查询.
一个像小巧玲珑的ORM会在这里有用吗?
编辑:根据danihp的回应,我开始研究实体框架的工作.看起来很有希望.我推断使用Fluent API我可以将这个dll移植到独特的应用程序中并传递db对象(而不是我的类?)来做业务逻辑.
Public Class Runs
Private _RunMailPeices As Dictionary(Of String, MailPiece) = New Dictionary(Of String, MailPiece)
Private _run As Integer
Private MailDate As DateTime
Public Property RunMailPeices As Dictionary(Of String, MailPiece)
Get
RunMailPeices = _RunMailPeices
End Get
Set(value As Dictionary(Of String, MailPiece))
_RunMailPeices = value
End Set
End Property
Public Property run As Integer
Get
run = _run
End Get
Set(value As Integer)
_run = value
End Set
End Property
End Class
Run Code Online (Sandbox Code Playgroud)
和:
Public Class MailPiece
Private …Run Code Online (Sandbox Code Playgroud)