entity-framework-4 Questions
3
Solved
I am using Entity Framework (Database First) and I am trying to import a bunch of data from an old database into our new one. In some instances it is important for the object IDs to remain the same...
Suspicion asked 29/3, 2012 at 21:42
3
Solved
I recently refactored a WPF app so that it no longer wraps each use of the DbContext in a using clause (see this question). Instead, my app just uses the same DbContext singleton throughout.
This ...
Nonu asked 13/4, 2011 at 1:54
2
Solved
This might get closed for a possible duplicate of this: The type of one of the expressions in the join clause is incorrect in Entity Framework
But I would request to not close this without reading ...
Bandicoot asked 8/7, 2021 at 15:50
3
I'm using Entity Framework 6 and "model first" in my solution, I separated my "Data Model" classes into another project, so that I can add reference to the "Data Model" classes without exposing my ...
Peshawar asked 26/8, 2014 at 20:45
3
I am using EF4 with WCF and POCO.
I removed all virtual keyword in POCO entities.
I have Employee and Team entities and relationship between both is 1:N, means that one employee can be allocated o...
Bubaline asked 18/10, 2010 at 7:7
5
Solved
I have what should be an easy question but I have been unable to find the answer myself.
I am using EF4 CTP-5 Code First Model with hand generated POCOs. It is processing string comparisons in gen...
Mcfarlin asked 24/2, 2011 at 18:58
3
I develop an SMS Server that receive SMS, Analysis them and reply to messages. This application developed with entity framework 4.0 and SQLServer 2008.
When I receive SMS I run new thread for that...
Occur asked 27/11, 2010 at 5:9
8
We are having some strange performance issues and I was hoping somebody may be able to point us in the right direction. Our scenario is an ASP.NET MVC C# website using EF4 POCO in IIS 7 (highly spe...
Grooms asked 22/5, 2012 at 11:16
7
Solved
What's the best way to remove all elements in a System.Data.Entity.DbSet, with Entity Framework 4.3?
Undercoating asked 4/5, 2012 at 12:17
7
Solved
I created a "Code Only" POCO for use against an existing database using Entity Framework 4 and the CTP4. When I run a query I get the error
The model backing the 'xyzContext' context has change...
Erund asked 23/8, 2010 at 21:52
5
Solved
I have been working with Entity Framework 4 recently, and am slightly confused as to when to use ObjectSet.Attach, and ObjectSet.AddObject.
From my understanding:
Use "Attach" when an Entity alr...
Factorage asked 13/10, 2010 at 0:59
5
Solved
We are using Entity Framework in our project and I have an entity that I built in my model. I then have a function import that uses a stored procedure. The method created by the function import is ...
Contagion asked 20/4, 2011 at 23:9
10
Solved
I am looking a way to set CommandTimeout for DbContext. After searching I found the way by casting DbContext into ObjectContext and setting value for CommandTimeout property of objectContext.
var ...
Emmyemmye asked 11/5, 2012 at 10:26
5
Solved
I have an Expression like so:
var values = Enumerable.Range(1,2);
return message => message.Properties.Any(
p => p.Key == name
&& int.Parse(p.Value) >= values[0]
&& ...
Furnish asked 22/5, 2013 at 14:39
2
TryGetObjectStateEntry returns false but when i try to attach the entity i get 'An object with the same key already exists in the ObjectStateManager. The ObjectStateManager cannot track multiple ob...
Wolfgang asked 29/10, 2011 at 11:53
2
Solved
I've a small problem with updating entities if the entity is changed outside the DbContext (is a detached entity). If I attach the modified entity, it's state is not modified.
My code looks like t...
Wainscoting asked 6/9, 2012 at 9:14
8
Solved
Basically I got a table in my EF database with the following properties:
public int Id { get; set; }
public string Title { get; set; }
public string Description { get; set; }
public string Image {...
Levkas asked 19/10, 2013 at 0:26
5
Solved
I'm starting to play around with the code-first approach to the entity framework, primarily so that I can decorate my properties with annotations for display in my view (otherwise, right now I have...
Ecesis asked 10/2, 2012 at 15:21
10
Solved
I am getting timeouts using the Entity Framework (EF) when using a function import that takes over 30 seconds to complete. I tried the following and have not been able to resolve this issue:
I add...
Longing asked 3/6, 2011 at 20:58
4
Solved
I use Entity Framework 4.0. Is it possible that SaveChanges() returns 0 but doesn't throw an exception? For example, after adding.
Here is my code:
try
{
_context.CodeProducts.Add(entity);
_con...
Shrunken asked 19/6, 2012 at 8:46
6
Solved
I am using EF 4 and is trying to unit test the follow line using Moq:
var convertError = models
.Where(x => SqlFunctions.StringConvert((decimal?) (x.convert ?? 0)) == "0")
.Any();
and it se...
Superb asked 19/2, 2013 at 22:11
3
Solved
I'm following a tutorial by Scott Gu that refers to a class named DbContext. I can't find it on any namespace on framework 4 and it seems to me it was renamed from CT4 DbContext to .net4 System.Dat...
Regular asked 12/8, 2010 at 19:47
4
Solved
I am using the Generic Repository pattern on top of Entity Framework Code First. Everything was working fine until I needed to include more entities in a query. I got to include one entity successf...
Postnasal asked 21/3, 2011 at 10:33
6
Solved
In my project I am using oracle and entity framework together.Both of my machines my developer machine win7 and my server win2008r2 I installed oracle beta entity framework and .net 4.0 framework. ...
Montgomery asked 29/9, 2011 at 11:46
15
Solved
I'm running EF 4.2 CF and want to create indexes on certain columns in my POCO objects.
As an example lets say we have this employee class:
public class Employee
{
public int EmployeeID { get; s...
Sirois asked 24/11, 2011 at 21:20
© 2022 - 2024 — McMap. All rights reserved.