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
Seems that if I have Foo model that inherits from Bar, when using Insert passing and instance of Foo, it's trying to insert into a Bar table.
public class Bar
{
}
public class Foo : Bar
{
//properties
}
public class Repository
{
public static void Insert<T>(string connectionString, T model) where T : Bar
{
using (var cnn = new SqlConnection(connectionString))
{
cnn.Open();
cnn.Insert(model);
}
}
}
The text was updated successfully, but these errors were encountered:
Seems that if I have Foo model that inherits from Bar, when using Insert passing and instance of Foo, it's trying to insert into a Bar table.
The text was updated successfully, but these errors were encountered: