You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my data access layer, one of the methods maps some of the model's fields.
varmappings=newColumnMappingCollection();// Start defining the mappings between each property/column for a typemappings.RegisterType<QueryResults>().MapProperty(x =>x.Distance).ToColumn("distance").MapProperty(x =>x.StreetLine1).ToColumn("street1").MapProperty(x =>x.StreetLine2).ToColumn("street2");mappings.RegisterWithDapper();stringquery="SELECT distance, "+"sites.street1, "+"sites.street2, "+"sites.city, "+"sites.state, "+"FROM mytable ";// Execute my query using Dapper IEnumerable<QueryResults>results=connection.Query<QueryResults>(query);
The results returned by the query do not include the unmapped properties/fields. Specifically, the City and State fields do not get populated.
The text was updated successfully, but these errors were encountered:
I have a model class:
In my data access layer, one of the methods maps some of the model's fields.
The results returned by the query do not include the unmapped properties/fields. Specifically, the City and State fields do not get populated.
The text was updated successfully, but these errors were encountered: