Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

Why required virtual property or fields

$
0
0

see the code

class Student {
      public virtual int ID { get; set; }
      public virtual string LastName { get; set; }
      public virtual string FirstMidName { get; set; }
   } 

i know virtual fields can be override in child class in terms of OOPS

tell me what is the objective of declaring fields as virtual in entity class ?

if we do not create virtual  fields then what worse will happen?

make me understand a nice example.


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>