Tahir Ansari

Tahir Ansari

  • 254
  • 7.5k
  • 187.8k

Model class constructor?

Feb 23 2023 10:39 AM

Hi,

anyone explain me for understanding

public class Action
    {
        public Action()
        {
            Permissions = new List<Permission>();
            this.CreatedOn = DateTime.Now;

        }

}

 

why we need constructor in model class


Answers (6)