Data Models
I have two Models, CustomerModel and CustomerInfo neither one relates to the other except that the Model(s) have fields in the same table and I wanted to separate the fields in the Models because they are used in different views of my .Net Maui Application. The Query below is not pulling in the values from CustomerInfo Model. We are using Dapper ORM and I was told to use the command called QueryMultiple so I thought I would see if anyone can give me some tips on getting started. Thanks !!!
public List<CustomerModel> GetCustomer(int Id)
{
string sql= "SELECT c.Id, c.Name, c.Address, c.AuthorizedToSign " +
"FROM Company as c " +
"WHERE c.ID=@Id ";
}
Public Class CustomerModel
{
public string Id{get;set:}
public string Name {get;set:}
public string Address{get;set:}
public Customelnfo Customer {get;set;}
}
Public Class CustomerInfo
{
public string AuthorizedToSign {get;set;}
}