efcore icon indicating copy to clipboard operation
efcore copied to clipboard

MutableEntityTypeExtensions.GetOrAddProperty

Open TrevorFradsham opened this issue 6 years ago • 2 comments

Attempted to upgrade project from net core 2.2 to 3.1 but MutableEntityTypeExtensions GetOrAddProperty method does not exist in net core 3.1. I cannot find any documentation on depreciation or reason for removal.

EF Core version: 3.1 Database provider: Microsoft.EntityFrameworkCore Target framework: Net core 3.1

TrevorFradsham avatar Dec 13 '19 18:12 TrevorFradsham

It was part of Metadata cleanup. You can use

var property = entityType.FindProperty("") ?? entityType.AddProperty("");

AndriySvyryd avatar Dec 13 '19 22:12 AndriySvyryd

Thank for the quick response.

TrevorFradsham avatar Dec 16 '19 06:12 TrevorFradsham