Saturday 14 September 2013

How to disable entity framework from creating Nullable property's

How to disable entity framework from creating Nullable property's

Is there a way to disable or to stop the entity framework from creating
Nullable properties in complex class?
Example, when I add a new stored procedure to the entity framework it
generates a class like the one below.
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your
application.
// Manual changes to this file will be overwritten if the code is
regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace StorefrontSystemDL
{
using System;
public partial class proc_InsertLeafHorizontal_Result
{
public Nullable<int> SizeID { get; set; }
public Nullable<int> FinishID { get; set; }
public Nullable<int> SitelineID { get; set; }
}
}
How can i, do i, or is there a settings that i can set to where the entity
framework does not create properties with Nullable types

No comments:

Post a Comment