EF Core 5.0 RC1 Table Schema

214 views Asked by At

I just upgraded my Blazor demo project to EF Core 5.0 RC1 in order to take advantage of the new many to many feature that it provides. After finishing the upgrade, I ran my unit tests and they all failed with the same error: "Invalid Object Name"

After a little investigation, I determined that the query is no longer including the table schema in the query. Since all of my tables belong to schemas other than dbo, none of my queries are working. I have tried to figure out how to make ef core 5.0 use the table schema, but I haven't had any luck.

I am specifying the schema on the model with the Table attribute as demonstrated below.

[Table("Work", Schema = "act")]
public class Work
{
    [Key]
    public int WorkID { get; set; }
}

I performed a migration and scripted it after the upgrade, and all of the tables had the correct schema, so clearly ef is able to see the schema, but for some reason it is leaving it off the query.

Thanks for any help you are able to provide.

0

There are 0 answers