Core data property not updating
It’s not uncommon to describe your domain entities across a set of classes and then layer those classes to describe a complete entity.For example, you may add a class called Blog Details to your model.Code first gives you two ways to add these configurations to your classes.One is using simple attributes called Data Annotations and the other is using code first’s Fluent API, which provides you with a way to describe configurations imperatively, in code.But this isn’t always the case in your applications.For example you might have a property in the Blog class that creates a code based on the Title and Blogger Name fields.
In domain driven design, Blog Details is referred to as a value object.
Entity Framework refers to value objects as complex types. However as a property in the Blog class, Blog Details it will be tracked as part of a Blog object.
In order for code first to recognize this, you must mark the Blog Details class as a Complex Type.
This article will focus on using Data Annotations (in the System. Data Annotations namespace) to configure your classes – highlighting the most commonly needed configurations.
Data Annotations are also understood by a number of . NET MVC which allows these applications to leverage the same annotations for client-side validations.