Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

when creating a new boolean column in an existing table how to set the default value as true in c# models code first

public class Revision
{
    ...
    public Boolean IsReleased { get; set; }
  	public Revision(){
    	IsReleased = true;
    }
    ....
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #creating #boolean #column #existing #table #set #default #true #models #code
ADD COMMENT
Topic
Name
1+4 =