I have a sql table called 'Notes', which I need to add for it a Model:
public class Note
{
public int ID { get; set; }
public string Note { get; set; }
public string UserName { get; set; }
public DateTime Date { get; set; }
}
I'm running into an issue with the Note member, I can't name it Note because member names cannot be same as their enclosing type, altering the table is also not an option- it's being used by another production website.
On the project's requirements classes names have to be consistent- the name should represent a single instance of the sql table, for example: Documents table -> Document model etc..
Basically the Note table should not have a Note column but that's it and I have to deal with.
Is there a way for a member name to be different than the SQL column name using Dapper?