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

Entity Framework 6 - Knowledge Base (KB)

12 results for: in tag: enums

How to work with Enums in Entity Framework?

What is the best way to work with Enums in Entity Framework?...Remarks: I'm using EF 3 and Firebird.
.net entity-framework enums
asked by Rafael Romão

Where should enums live in an MVC project structure?

I'm using .NET MVC 3 Code-First approach. My domain have a entity called ...Question..., this entity have a ...Score... property that is ...Byte... and I want to replace that property to an ...Enum... and name this ...Enum... to ...Score... where I can se...
.net asp.net-mvc domain-driven-design entity-framework enums
asked by Acaz Souza

Using Enums in Entity Framework Where Clause

So here is what I have for my enum. Really basic. The enum does NOT have a corresponding database table. Rather, whenever a class has a MyEnum property, the database has an int column. That all works fine....public enum MyEnum : int { Zero = 0, On...
entity-framework enums lambda linq
asked by Alec

LINQ Entity Data Reader does not support enums

I have to do a batch insert of a lot of entities, so I figured the best way to do that was to use the ...SqlBulkCopy... class. However, that class operates on ...DataReader... instances, whereas my code works with an IEnumerable where T is my entity class...
entity-framework enums sqlbulkcopy
asked by Erik Schierboom

Enum Support for Entity Framework Database First

I can find a bunch of tutorials on how to implement enum support for model first and code first like these:...http://msdn.microsoft.com/en-us/data/jj248772.aspx...http://msdn.microsoft.com/en-us/data/hh859576.aspx...Can anyone explain to me or provide me ...
.net .net-4.5 edmx entity-framework enums
asked by TMan

There is no ViewData item of type 'IEnumerable<SelectListItem>' that has the key 'PestType'

I am learning MVC and Entity Framework, so pleas bear my questions... I am trying to create a drop down menu for a property (Enum type) for my model class SinglePest Here is the model:...public class SinglePest { public int SinglePestId { get; set; } ...
asp.net-mvc-4 c# entity-framework enums
asked by mikey

Can a foreign key column be an Enum in Entity Framework 6 code first?

I am converting EF5 DB first into EF6 code first. in the old setup there are some FKs that are bytes. and in the application are mapped to enums with the underlining type of byte. this has been working wonderfully....Going over to code first and EF6 I fou...
c# entity-framework-6 enums foreign-keys
asked by user1852503

Code First Enumerations put into Lookup Tables

I have worked in a lot of shops where they ran a Database First Model so Lookup Tables were always required. Your lookup table had to match your Enums so that you kept database integrity. I 100% agree with this idea, but have found that when it comes to t...
c# entity-framework enums
asked by Jason H

Using enum values in Domain Model with EF Code First approach

I use ...Entity Framework Code First... approach in my ...MVC... application and I have some entity classes for every table in the database. On the other hand, I need to use some lookup values i.e. gender, status for which I do not want to create a separa...
asp.net-mvc c# domain-model entity-framework enums
asked by Jack

How to create a table corresponding to enum in EF6 Code First?

I've followed ...MSDN... on how to handle enumerations in Code First for EF6. It worked, as supposed to ...but... the field in the created table that refers to the enumerator is a simple ...int.......I'd prefer a second table to be produced, the values of...
c# ef-code-first entity-framework entity-framework-6 enums
asked by Konrad Viltersten

How to map an int to its enum description using AutoMapper during a queryable projection?

Here is the enum extension method to get its description attribute....public static string GetDescription(this Enum enumeration) { if (enumeration == null) throw new ArgumentNullException(); var value = enumeration.ToString(); var typ...
automapper automapper-4 entity-framework-6 enums iqueryable
asked by BBauer42

How to map Enum property in Entity Framework 6 Code First and Fluent Api

I've been searching the internet how to map enum in ASP.NET MVC project using Entity Framework 6 (Code First and Fluent Api), the results of my search showed that this type of mapping is not trival as in we do in Java (Hibernate + JPA) ....I found an arti...
c# code-first ef-fluent-api entity-framework enums
asked by André Geraldo dos Santos

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