zzz projects Entity Framework 6 EF 6
Home EF Core Articles Knowledge Base Online Examples
  • Home
  • EF Core
  • Articles
  • Knowledge Base
  • Online Examples

Entity Framework 6 - Knowledge Base (KB)

16 results in tag: t4

In a T4 template file, how do I validate the datatype of a property in an entity?

I am customizing my .tt file in EF 4.0. Now as part f customization I need to add some code to a property in POCO class generation, if the property type is ...Nullable<System.DateTime>... or ...System.DateTime.... I am not able to find the proper syntax f...
c# entity entity-framework t4 templates
asked by WPFProgrammer

What happened to CodeGenerationTools?

In entity framework T4 templates, I can use class CodeGenerationTools....For example:...void WriteProperty(**CodeGenerationTools** code, EdmProperty edmProperty) { WriteProperty(Accessibility.ForProperty(edmProperty), code.Escape(edm...
entity-framework t4
asked by user380719

Using T4 Templates to Generate multiple classes based on POCO

Im looking for a way to increase productivity when I add a table to my database. Generally, when I add a new table I have to perform the following steps....Add table to the database (simple)...Create the corresponding EF Code First class. (i dont use db...
c# code-generation entity-framework t4
asked by jason

Metadata file not found - Data.Entity.Model

Anyone having similar problem, while creating webservices?...Compiling transformation: Metadata file 'D:\Program Files\VS2013\Common7\Tools..\IDE\Microsoft.Data.Entity.Design.dll' could not be found D:\PROJEKTY\apki\ws2\WS\WS\DataModel.tt...I tried...
ado.net-entity-data-model entity-framework t4 visual-studio-2013
asked by ignacy130

Generating Model code from Model.edmx in EF6 without Visual Studio

For our application, we do not use Visual Studio in the build process; Visual Studio is not on the build servers. In general, we have kept Visual Studio as a "nice to have" for developing the application, but the crucial requirements for a reproducible bu...
c# entity-framework-6 mono monodevelop t4
asked by Martin Eden

EF6 and pre-generated views

I am using EF code first method in my project. Recently I updated EF version of my project to ...EF 6... using Package Manager Console....All of my entities are inherited from a ...BaseEntity... class as a super class :...public abstract class BaseEntity ...
c# ef-code-first entity-framework t4
asked by Masoud

T4 template to generate Code First MetaData buddy classes

Setup:...I build a lot of MVC apps from scratch, but that use existing databases. ...Using the Entity Framework -> Reverse Engineer Code First context menu item, I get the Code First classes, DbContext class and the mapping classes from the database. ...
ef-code-first entity-framework-6 t4
asked by awrigley

Entity Framework 6.1 Code first from existing DB - add foreign key to T4 template

I'm using EF 6.1 new feature - Code first from existing DB - and I'd like to add a foreign key in addition to each navigation property. I added the default T4 templates from nuget but I cannot figure out how to edit it. I guess it should be a quite common...
ef-code-first entity-framework entity-framework-6 t4
asked by Matteo Sganzetta

EntityCollection - ICollection<InterfaceTEntity> - Runtime Issue/Quirk

Background Info...I'm using the Database-First approach. ...I created a TextTemplate (.tt) file that generates interfaces from the EDMX file, also, I modified the original TextTemplate file included/produced by the EDMX file (project item) to have the gen...
c# entity-framework entity-framework-6 interface t4
asked by Brett Caswell

Prevent EF6 from generate navigation properties

I've recently started to use EF6 and i'm building a couple of T4 templates to generate some code automatically (on VS2012)....I'm generating my model from the database and this process creates all the associations automatically based on the DB ForeignKeys...
entity-framework-6 navigation-properties t4
asked by Flavio Oliveira

How to get extended properties of sql table in Entity framework (EF6)?

I am working in VS-2013. I've added ...ADO.NET Entity Data Model... containing: ...EF Designer from Database,...Code First From Database...Connected to some of the tables in my database, it generated ...tt... file with partial class and add annotation on...
c# edmx entity-framework-6 sql-server-2008 t4
asked by Adhik

Custom changes to entity generated classes

I am using VS 2013, EF 6, and database first....I have generated entity from database and would like to shut off auto generation as I would like to add custom attributes to the generated classes. My classes were generated using T4, how do I make custom ch...
c# entity-framework-6 poco t4 vb.net
asked by Dan

Generating/using table valued functions in Entity Framework 6.x with the help of EF Reverse POCO Generator

In my project I rely heavily on the EF Reverse POCO generator by Simon Hughes....I have a TVF ...GetItemSummaries... that takes 4 parameters and returns a table. This TVF is actually a replecement for a view (and the generator did not recognize the view d...
c# code-generation entity-framework-6 poco t4
asked by John

Multiple EF6 DB Models with same Entity names conflicting and getting overwritten, How to set model output directory in EF6?

I am working with ...EF6... and generating models (database-first) from multiple databases. Some databases have same table names so when model is generated they start conflicting. To solve ...namespace... problem I went to ...Model.tt... file properties i...
c# ef-database-first entity-framework entity-framework-6 t4
asked by Matas Vaitkevicius

Using T4 template to force PascalCase (TitleCase) for entities in Entity Framework 6

Turns out, simply modifying the default T4 template was actually really easy. Inside ...GetTypeName... there is a ...is StructuralType... check which handles all non-primitive types. That pretty well fixed the majority of my issues. Then it was just a mat...
c# entity-framework entity-framework-6 t4 visual-studio
asked by Nick Alexander

Where are types used in Entity Framework T4 templates defined?

In the ....tt... files created by Entity Framework for my entities and ...DbContext... generation, I see classes like ...TypeMapper... and ...Accessibility... used. Where are these types defined and are they documented anywhere? I want to customize my t4 ...
entity-framework entity-framework-6 t4
asked by xr280xr

Page 1 of 1
  • 1

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...

Related

  • EF Extensions Online Benchmark
  • WIN an EF Extensions license
  • EF6 BatchSaveChanges for only $79
Save your entities 20× faster with EF Extensions
SaveChanges vs BulkSaveChanges

EF Extensions
Try for free now
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!