layris3 / Daily-learning-experience-record

daily learning experience
0 stars 0 forks source link

EF-calculated property #17

Open layris3 opened 4 years ago

layris3 commented 4 years ago
        [Display(Name = "Full Name")]
        public string FullName
        {
            get
            {
                return LastName + ", " + FirstMidName;
            }
        }

FullName is a calculated property that returns a value that's created by concatenating two other properties. Therefore it has only a get accessor, and no FullName column will be generated in the database.