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
I'm currently facing an issue that I cannot map object to table name.
For example. I have an object:
[Table("tram")]
public class Station
{
/// <summary>
/// Id of station.
/// </summary>
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// Name of station.
/// </summary>
[Column("name")]
public string Name { get; set; }
/// <summary>
/// Name of station type.
/// </summary>
[Column("typename")]
public string TypeName { get; set; }
/// <summary>
/// Coordinate of station.
/// </summary>
[Column("name")]
public string Coordinate { get; set; }
/// <summary>
/// Address of station.
/// </summary>
[Column("diachi")]
public string Address { get; set; }
/// <summary>
/// Area which station belongs to.
/// </summary>
[Column("area")]
public string Area { get; set; }
/// <summary>
/// Phone number of station monitor.
/// </summary>
[Column("phone")]
public string Phone { get; set; }
}
When I did a query, I received an exception: MySql.Data.MySqlClient.MySqlException: Table 'localdb.Station' doesn't exist
Is it a bug or my wrong implementation ?
Thank you,
The text was updated successfully, but these errors were encountered:
This seems to be a bug. I tried using an attribute to specify the table name and it was ignored for EnsureCreated as well. I'll look into this when I can. In the mean time, I think you should be able to use the fluent API, like
Hi there,
I'm currently facing an issue that I cannot map object to table name.
For example. I have an object:
When I did a query, I received an exception: MySql.Data.MySqlClient.MySqlException: Table 'localdb.Station' doesn't exist
Is it a bug or my wrong implementation ?
Thank you,
The text was updated successfully, but these errors were encountered: