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
@thorgard It's an arbitrary object attached to the model and referenced by a name. It's not a "data annotation" or a .NET attribute. It's just a way of attaching information to the model that can later be read from the model. Internally, lots of things configured on the model are stored as annotations--for example, the constraint name for an FK.
You are free to add your own annotations, but they have little value unless you implement something that also uses them, and that's not common. One place they can be useful is to flow information from model building through to Migrations--issue #10258 is about making that easier to use.
https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.modelbuilder.hasannotation?view=efcore-2.1
How exactly does it work? What is exactly annotation in this method's context? Is this database related or application related?
Does it mean I can add attributes like
[MyAttribute]
using fluent API?The text was updated successfully, but these errors were encountered: