Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2012
    Location
    Huntington Beach, CA
    Posts
    3

    Can EF Code First MVC DataAnnotations Use Private Setters

    I have written an mvc application in the past. However, I did not use the private setter in my previous applications. After watching C#102, I have tried to change my philosophy about private setters and initialization of classes.

    In an attempt to bring this new philosophy, best practices, to a new mvc application I'm building. However, I have a had a moment of pause because of the way Entity Framework Code First is implemented.

    So the question is. Bring the best practices, private setter, into the mvc ef code first, or not?

  2. #2
    Join Date
    Nov 2009
    Posts
    13
    Given that Entity Framework can handle private members, or even the lack of a setter for that matter, then by all means make use of this ability where you are most comfortable.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •