Add the mapping strategy to support the table name and column name
jack-gaojz opened this issue · 0 comments
jack-gaojz commented
In the real scenario, we should create the datatable with the different name conventions. For example: tbl_customer (table name), id(column name), first_name(column name). But the domain object should follow the C# name convention, for example
public class Customer
{
public int Id { get; set; }
public string FirstName { get; set; }
}
We can define a interface IMappingStrategy then implement different strategies:
We can define the global strategy or set the strategy for the speicifed domain object event the property. We will generate the SQL with the defined strategies. That will be wonderful feature.
Thanks.