entity-framework-ctp5 Questions

8

Solved

Using Entity Framework 4 CTP5 Code First and this example Is it possible to access the discriminator value? I would like to use it in a projection like context.BillingDetails.Select(x => new ...
Fortier asked 24/12, 2010 at 11:6

2

Solved

I'm using Entity Framework CTP5 and Code First. I need to change the Collation for a specific column in SQL Server. I believe the default collation is SQL_Latin1_General_CP1_CI_AS, but I need to ch...

10

Solved

I have a stored procedure that has three parameters and I've been trying to use the following to return the results: context.Database.SqlQuery<myEntityType>("mySpName", param1, param2, param...
Ozalid asked 2/2, 2011 at 11:1

2

Solved

I am using EF4 CTP 5, CodeFirst. Please see my classes first: public class Guest { [Key] public Guid GuestID { get; set; } public Language PreferredLanguage { get; set; } public Guid? Langua...

2

Solved

I have a table Person: id, name I often have queries like: select * from Person where name Like "%abc%". I have 2 questions: How do I implement this query using code-first 5 (CTP5) How do I ...
Undermost asked 18/2, 2011 at 11:35

2

Solved

During insert a float number like 0.0001 into sql from my code, the result is a 0.0000 in database. here is definition of my table column: decimal(20,15) Here is the definition of class field: ...
Aldosterone asked 25/11, 2014 at 15:10

3

Solved

With EF4 CTP5 DbContext, what is the equivalent of this public void Refresh(Document instance) { _ctx.Refresh(RefreshMode.StoreWins, instance); } I've tried this but it doesn't do the same t...

7

I am trying to use Entity Framework 5 for my project but I seem to be having some issue getting the assembly installed to comply. And since I installed this initially using nuget, I am not certain ...
Topee asked 13/7, 2012 at 13:20

5

Solved

I'm having problems with a circular reference when i try and serialise an object returned via EF4 CTP5. Im using the code first approach and simple poco's for my model. I have added [ScriptIgnore]...

2

Solved

This code has worked for me before but i am not sure anymore what has been causing this error. My only guess is that when i try to create a Player, the Team Data is being sent back to Team table an...

2

Is there any way I can tell EF to not worry about the number of rows a DELETE or UPDATE do or don't do? I'm trying to delete a row from the database, but because the row doesn't exist, EF throws an...
Baa asked 17/2, 2011 at 1:15

2

Solved

I am trying to reproduce the same behavior as EntityObject using CTP5 DBContext for change tracking. Consider the tables Movie and Director. Relationship is only 1 director for a movie and multiple...
Larner asked 10/2, 2011 at 21:48

3

The DbContext T4 template that comes with CTP5 does not have association fixup and not all properties are marked as virtual. Does it mean it does not support ChangeTracking when disconnected from c...
Speculator asked 11/2, 2011 at 2:31

2

Solved

I have this class and table: public class Foo { public Guid Id {get;set;} public string Name {get;set;} } create table Foo ( id uniqueidentifier primary KEY DEFAULT (newsequentialid()), name ...

3

Solved

Given a EF-Code First CTP5 entity layout like: public class Person { ... } which has a collection of: public class Address { ... } which has a single association of: public class Mailbox { .....
Mutable asked 1/3, 2011 at 19:56

2

Solved

I have a generic repository an I am trying to add a GetById method as shown here C# LINQ to SQL: Refactoring this Generic GetByID method The problem is my repository does not use System.Data.Linq....

1

Solved

Here's the scenario, i have a website, which in a single HTTP request (HTTP POST), i need to do the following: Grab an object (let's say "Tag") Save some other object (let's say "Question") Get a...

1

Solved

I know the question already has a solution (eg. this question) but I really can't afford to attach the mapping logic in the same assembly where the domain (POCO classes) is. Is there any other way...

3

Solved

Using Entity Framework Code First CTP5, how do I create a primary key column that are INTs and are not identity columns Preferably not using attributes.
Convenience asked 15/2, 2011 at 4:23

3

Solved

I'm using the mvc-mini-profiler in my project built with ASP.Net MVC 3 and Entity Framework code-first. Everything works great until I attempt to add database profiling by wrapping the connection...
Imprint asked 1/7, 2011 at 15:35

2

Solved

I'm using standards for singular table names. EF4 Code First has by default to pluralize table names. I have put the code to override this convention, but seems is not working. using section: usi...

2

Solved

Given this code: public class Car { public virtual int CarId { get; set; } public virtual string TypeName { get; set; } public ConvertableNullable<double> Price { get; set; } } Where t...
Clarissaclarisse asked 28/4, 2011 at 15:16

2

Solved

We are using complex types to manage our translatable fields like this: [ComplexType] public class Translated { [Required] public string NL { get; set; } [Required] public string EN { get; se...

1

I have the following scenario in my database. It is a record of Studies and those studies have other studies as prerequisites. In my DB design, it looks like this: And my code looks something l...

1

Solved

I am starting out with using the EF Code First with MVC and am a bit stumped with something. I have the following db structure (Sorry but I was not allowed to post an image unfortunately): Table ...

© 2022 - 2024 — McMap. All rights reserved.