I have the following database tables:
TABLE dbo.Client
(
ClientId PK uniqueidentifier ,
ClientNames VARCHAR(200)
)
TABLE dbo.User
(
userID PK UniqueIdentifier,
password varchar(15),
passwordsalt varchar(15),
ClientID FK uniqueidentifier
)
I want to map them to my class:
public class Client
{
public virtual Guid Id {get;set;}
public virtual string Name {get;set;}
public virtual string password {get;set;}
public virtual string passwordsalt {get;set;}
}
I've sorted the mapping to the bits in the client table (excuse the vb...)
Public Class ClientMap
Inherits ClassMap(Of Client)
Public Sub New()
Me.Id(Function(x) x.Id, "ClientID")
Me.Map(Function(x) x.Name, "ClientNames")
End Sub
End Class
How do I go about mapping the password & passwordsalt properties to the corresponding columns in the users table?
Thanks in advance,
Pau