I created a generic dll that contains commonly used variables. I have custom fields that are owners of places, so we can store customer-specific data. This DLL will be used in client applications.
How to match these common variables with the corresponding fields of the sql table so that we can manipulate the user database? I want to avoid writing custom queries.
Would ORM be useful, like dapper?
Edit: In response to danihp, I began to learn how the Entity frame works. It looks promising. I assume that using the Fluent API, I can turn this dll-portable into unique applications and pass a db object (instead of my class?) To conduct business logic.
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
and
Public Class MailPiece Private _address1 As String = String.Empty Private _address2 As String = String.Empty Private _string1 As String = String.Empty Private _string2 As String = String.Empty Public Property Address1 As String Get Address1 = _address1 End Get Set(value As String) _address1 = value End Set End Property Public Property Address2 As String Get Address2 = _address2 End Get Set(value As String) _address2 = value End Set End Property Public Property String1 As String Get String1 = _string1 End Get Set(value As String) _string1 = value End Set End Property Public Property String2 As String Get String2 = _string2 End Get Set(value As String) _string2 = value End Set End Property End Class
DavidTheDev
source share