¡@

Home 

c# Programming Glossary: ef

Problem with converting int to string in Linq to entities

http://stackoverflow.com/questions/1066760/problem-with-converting-int-to-string-in-linq-to-entities

to entities tostring share improve this question With EF v4 you can use SqlFunctions.StringConvert . There is no overload..

Making Entity Class Closed for Changes

http://stackoverflow.com/questions/11425993/making-entity-class-closed-for-changes

using Strategy Pattern Prefer composition over inheritance EF 4.1 Code first vs Model Database first Strategy Pattern and.. How to use the Strategy Pattern with C# Inheritance with EF Code First Part 2 Table per Type TPT http weblogs.asp.net manavi.. CreditCardPayment IPayment more code ... Something on your EF context to get all payments public partial class PaymentEntities..

Soft Delete Entity Framework Code First

http://stackoverflow.com/questions/12698793/soft-delete-entity-framework-code-first

the entity deriving from an abstract class or an interface EF mapping doesn't currently support interfaces as an entity protected.. delete sql is to change the stored procedures generated by EF6 public override int SaveChanges foreach var entry in ChangeTracker.Entries.. So does setting it to Detached And that is what EF does when it deletes an item http msdn.microsoft.com en us data..

How can I easily convert DataReader to List<T>? [duplicate]

http://stackoverflow.com/questions/1464883/how-can-i-easily-convert-datareader-to-listt

able to you are likely to be better of using NHibernate EF or Linq to Sql etc However on old project or for other sometimes..

Entity Framework 4 - AddObject vs Attach

http://stackoverflow.com/questions/3920111/entity-framework-4-addobject-vs-attach

Added . When SaveChanges is called it will be clear to the EF that this entity needs to be inserted into the database. ObjectContext.Attach..

How do I do pagination in ASP.NET MVC?

http://stackoverflow.com/questions/446196/how-do-i-do-pagination-in-asp-net-mvc

you use pageNumber rather than startIndex With LINQ toSQL EF etc this should compose down to the database too. You should..

What is the purpose of self tracking entities?

http://stackoverflow.com/questions/5091974/what-is-the-purpose-of-self-tracking-entities

is what generating these entities gives you over the basic EF entities Also some people have mentioned self tracking entities..

EF Including Other Entities (Generic Repository pattern)

http://stackoverflow.com/questions/5376421/ef-including-other-entities-generic-repository-pattern

Including Other Entities Generic Repository pattern I am using.. the Include extension on IQueryable. It is available in EF 4.1 assembly. If you don't want to reference that assembly in..

EF 4.1 - Code First - JSON Circular Reference Serialization Error

http://stackoverflow.com/questions/5588143/ef-4-1-code-first-json-circular-reference-serialization-error

4.1 Code First JSON Circular Reference Serialization Error .. OrderController public ActionResult GetAll return Json ppEFContext.Orders JsonRequestBehavior.AllowGet Thanks c# json entity.. graph explicitely public ActionResult GetAll return Json ppEFContext.Orders .Include o o.Patient .Include o o.Patient.PatientAddress..

Unique key with EF code first

http://stackoverflow.com/questions/5701608/unique-key-with-ef-code-first

key with EF code first I have a following model in my project public class.. you can't define it as unique key in code first because EF doesn't support unique keys at all it is hopefully planned for..

Parsing SQL code in C# [duplicate]

http://stackoverflow.com/questions/589096/parsing-sql-code-in-c-sharp

improve this question Use Microsoft Entity Framework EF . It has a Entity SQL parser which builds an expression tree..

Create code first, many to many, with additional fields in association table

http://stackoverflow.com/questions/7050404/create-code-first-many-to-many-with-additional-fields-in-association-table

a customized join table. In a many to many relationship EF manages the join table internally and hidden. It's a table without..

Entity Framework - Using Transactions or SaveChanges(false) and AcceptAllChanges()?

http://stackoverflow.com/questions/815586/entity-framework-using-transactions-or-savechangesfalse-and-acceptallchanges

and it appears that they take care of themselves in EF as long as I pass false to SaveChanges and then call AcceptAllChanges..

What is the connection string for localdb for version 11

http://stackoverflow.com/questions/10540438/what-is-the-connection-string-for-localdb-for-version-11

framework http blogs.msdn.com b adonet archive 2011 09 28 ef 4 2 code first walkthrough.aspx . I have the latest SQL Server..

Entity Framework initialization is SLOW — what can I do to bootstrap it faster?

http://stackoverflow.com/questions/10757019/entity-framework-initialization-is-slow-what-can-i-do-to-bootstrap-it-faster

MyDbContext db.Personnel.Where a a.Login login .SingleOrDefault . Also an EF Migrations Seed AddOrUpdate generates effectively.. . Also an EF Migrations Seed AddOrUpdate generates effectively the same stack. The fuller stack trace which may give..

Why does my C# gzip produce a larger file than Fiddler or PHP?

http://stackoverflow.com/questions/11435200/why-does-my-c-sharp-gzip-produce-a-larger-file-than-fiddler-or-php

using this code Stream stream new MemoryStream Encoding.Default.GetBytes Hello World var compressedMemoryStream new MemoryStream.. 66 16 40 cc iG# . .. eVe f.@. 0000 0050 ed 9d bc f7 de 7b ef bd f7 de 7b ef bd f7 ba 3b ..... .. .. .... 0000 0060 9d 4e.. . .. eVe f.@. 0000 0050 ed 9d bc f7 de 7b ef bd f7 de 7b ef bd f7 ba 3b ..... .. .. .... 0000 0060 9d 4e 27 f7 df ff 3f..

Get all associate/composite objects inside an object (in Abstract way)

http://stackoverflow.com/questions/11470037/get-all-associate-composite-objects-inside-an-object-in-abstract-way

the PaymentID column in this table. A leaky abstraction refers to any implemented abstraction intended to reduce or hide.. Samples http blogs.msdn.com b adonet archive 2010 12 14 ef feature ctp5 fluent api samples.aspx C# CODE public interface..

Exclude a field/property from the database with Entity Framework 4 & Code-First

http://stackoverflow.com/questions/1707663/exclude-a-field-property-from-the-database-with-entity-framework-4-code-first

field from the database c# .net entity framework 4 ef code first poco share improve this question In the current.. e.IsMale e.IsMarried Because AddressAs is not referenced it isn't part of the Entity Database. The EF team is..

Entity Framework Code Only error: the model backing the context has changed since the database was created

http://stackoverflow.com/questions/3552000/entity-framework-code-only-error-the-model-backing-the-context-has-changed-sinc

happening or what I can change. I merely created the POCO defined a simple DbContext made a few tweaks and then tried to run.. http weblogs.asp.net scottgu archive 2010 08 03 using ef code first with an existing database.aspx For those who are.. the database if it's not there or add seed data. The default DatabaseInitializer tries to compare the database schema..

How to declare one to one relationship using Entity Framework 4 Code First (POCO)

http://stackoverflow.com/questions/3622572/how-to-declare-one-to-one-relationship-using-entity-framework-4-code-first-poco

framework 4 v2 with poco but the article that the answer references was not useful there is one line of code that is a 1.. poco but the article that the answer references was not useful there is one line of code that is a 1 1 relationship but no.. code that is a 1 1 relationship but no mention of how to define it . c# entity framework ef code first poco one to one ..

EF4 Code First: how to add a relationship without adding a navigation property

http://stackoverflow.com/questions/5217441/ef4-code-first-how-to-add-a-relationship-without-adding-a-navigation-property

without adding a navigation property How should I define relationships using Code First but without using any navigation.. without using any navigation properties Previously I have defined One Many and Many Many by using navigation properties in.. Mel c# entity framework entity framework 4 code first ef code first share improve this question I believe you always..

Does Entity Framework 4 Code First have support for identity generators like NHibernate?

http://stackoverflow.com/questions/5275306/does-entity-framework-4-code-first-have-support-for-identity-generators-like-nhi

Guid.Empty initial values. I know that you can set a default value for the column in the DB to newid but that defeats.. default value for the column in the DB to newid but that defeats the purpose of client side identity generation. Is Entity.. system c# entity framework entity framework 4 ef code first share improve this question No Entity framework..

EF Including Other Entities (Generic Repository pattern)

http://stackoverflow.com/questions/5376421/ef-including-other-entities-generic-repository-pattern

TEntity class return string.Format 0 . 1 _objectContext.DefaultContainerName _pluralizer.Pluralize typeof TEntity .Name.. c# entity framework entity framework 4 repository pattern ef code first share improve this question Use just the Include.. It is available in EF 4.1 assembly. If you don't want to reference that assembly in your upper layers create wrapper extension..

Navigation Property without Declaring Foreign Key

http://stackoverflow.com/questions/5691780/navigation-property-without-declaring-foreign-key

contain at least two associations. When modeling this in ef4 I've only been able to do this without a second Foreign Key.. User Modifier get set c# entity framework mapping ef code first entity framework 4.1 share improve this question.. improve this question I believe it is not possible to define the relationship only with data attributes. The problem is..

Unique key with EF code first

http://stackoverflow.com/questions/5701608/unique-key-with-ef-code-first

find any. Can any suggest me how to do it please c# ef code first entity framework 4.1 unique key share improve this.. share improve this question Unfortunately you can't define it as unique key in code first because EF doesn't support.. because EF doesn't support unique keys at all it is hopefully planned for next major release . What you can do is to create..

Entity Framework 4.1 - EFTracingProvider

http://stackoverflow.com/questions/5788309/entity-framework-4-1-eftracingprovider

use dbcontext. Thanks in advance c# entity framework 4.1 ef code first share improve this question Yes you can. I'm..

How should I access a computed column in Entity Framework Code First?

http://stackoverflow.com/questions/6944904/how-should-i-access-a-computed-column-in-entity-framework-code-first

because EF Code First creates the table from the class before the alter script is ran. Any suggestions are welcome. c#.. is ran. Any suggestions are welcome. c# entity framework ef code first share improve this question I have a somewhat..

ICollection<T> Vs List<T> in Entity Framework

http://stackoverflow.com/questions/7655845/icollectiont-vs-listt-in-entity-framework

List T in Entity Framework I only watched a few webcasts before I went head first in to designing a few Entity Framework.. to what I have done or should I change it c# list ef code first ienumerable icollection share improve this question.. is a good choice despite List T working. The interface defines the contract but not the implementation. The implementation..

Entity Framework 4.1 The model backing the context has changed since the database was created, immediately after creating DB

http://stackoverflow.com/questions/7931295/entity-framework-4-1-the-model-backing-the-context-has-changed-since-the-databas

help c# sql server entity framework entity framework 4.1 ef code first share improve this question The error you see..

Entity Framework Stored Procedure Table Value Parameter

http://stackoverflow.com/questions/8157345/entity-framework-stored-procedure-table-value-parameter

I set the SqlParameter.TypeName to the name of the user defined type I created on the database and then when I run the query.. DbConext as well c# entity framework stored procedures ef code first table valued parameters share improve this question.. code examples Slightly off question but none the less useful for people trying to pass User Defined Tables into a store..

Entity Framework Code First Fluent Api: Adding Indexes to columns

http://stackoverflow.com/questions/8262590/entity-framework-code-first-fluent-api-adding-indexes-to-columns

a way to do this the code first way c# entity framework 4 ef code first dataannotations fluent interface share improve.. unique true AddColumn Blogs Rating c c.Int nullable false defaultValue 3 public override void Down DropIndex Posts new BlogId..