设为首页 加入收藏

TOP

Entity Framework工具POCO Code First Generator的使用(二)
2017-10-10 13:49:37 】 浏览:10044
Tags:Entity Framework 工具 POCO Code First Generator 使用
= false; // Removes POCO constructor and instead uses C# 6 property initialisers to set defaults UseLazyLoading = true; // Marks all navigation properties as virtual or not, to support or disable EF Lazy Loading feature IncludeComments = CommentsStyle.AtEndOfField; // Adds comments to the generated code IncludeExtendedPropertyComments = CommentsStyle.InSummaryBlock; // Adds extended properties as comments to the generated code IncludeConnectionSettingComments = true; // Add comments describing connection settings used to generate file IncludeViews = true; IncludeSynonyms = false; IncludeStoredProcedures = true; IncludeTableva luedFunctions = false; // If true, you must set IncludeStoredProcedures = true, and install the "EntityFramework.CodeFirstStoreFunctions" Nuget Package. DisableGeographyTypes = false; // Turns off use of System.Data.Entity.Spatial.DbGeography and System.Data.Entity.Spatial.DbGeometry as OData doesn't support entities with geometry/geography types. //CollectionInterfaceType = "System.Collections.Generic.List"; // Determines the declaration type of collections for the Navigation Properties. ICollection is used if not set. CollectionType = "System.Collections.Generic.List"; // Determines the type of collection for the Navigation Properties. "ObservableCollection" for example. Add "System.Collections.ObjectModel" to AdditionalNamespaces if setting the CollectionType = "ObservableCollection". NullableShortHand = true; //true => T?, false => Nullable<T> AddUnitTestingDbContext = true; // Will add a FakeDbContext and FakeDbSet for easy unit testing IncludeQueryTraceOn9481Flag = false; // If SqlServer 2014 appears frozen / take a long time when this file is saved, try setting this to true (you will also need elevated privileges). IncludeCodeGeneratedAttribute = true; // If true, will include the GeneratedCode attribute, false to remove it. UsePrivateSetterForComputedColumns = true; // If the columns is computed, use a private setter. AdditionalNamespaces = new[] { "" }; // To include extra namespaces, include them here. i.e. "Microsoft.AspNet.Identity.EntityFramework" AdditionalContextInterfaceItems = new[] // To include extra db context interface items, include them here. Also set MakeClassesPartial=true, and implement the partial DbContext class functions. { "" // example: "void SetAutoDetectChangesEnabled(bool flag);" }; // If you need to serialize your entities with the JsonSerializer from Newtonsoft, this would serialize // all properties including the Reverse Navigation and Foreign Keys. The simplest way to exclude them is // to use the data annotation [JsonIgnore] on reverse navigation and foreign keys. // For more control, take a look at ForeignKeyAnnotationsProcessing() further down AdditionalReverseNavigationsDataAnnotations = new string[] // Data Annotations for all ReverseNavigationProperty. { // "JsonIgnore" // Also add "Newtonsoft.Json" to the AdditionalNamespaces array above }; AdditionalForeignKeysDataAnnotations = new string[] // Data Annotations for all ForeignKeys. { // "JsonIgnore" // Also add "Newtonsoft.Json" to the AdditionalNamespaces array above }; ColumnNameToDataAnnotation = new Dictionary<string, string> { // This is used when Us
首页 上一页 1 2 3 4 5 6 7 下一页 尾页 2/9/9
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇asp.net MVC 上传文件 System.Web.. 下一篇Wpf TemplateBinding

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目