hello, I am trying out the ria services and I am experiencing this problem that seems very strange to me. I am creating a new entity of type "House" and add it to context without saving the context so the id of the new entity is 0, after i remove this entity and add another new entity of type "House" again and again without saving the co...
I'm using EF4 and STE w/ Silverlight.
I'm having trouble deleting child records from my primary entity. For some reason I can remove child entities if their foreign key to my primary entity is part of their Primary Key.
But if it's not, they don't get removed.
I believe these posts explains it:
http://mocella.blogspot.com/2010/01/enti...
Here's a strange one.
After renaming a class, one of my forms began giving me errors in the designer, refusing to open. Funny thing is, the form worked just fine when I ran the program.
I began reverting my changes to deduce the problem. I have now reverted completely back to the last commit - in which I know the form was working in ...
I have a query that pulls back a user's "feed" which is essentially all of their activity. If the user is logged in the query will be filtered so that the feed not only includes all of the specified user's data, but also any of their friends.
The database structure includes an Actions table that holds the user that created the action a...
Suppose my WinForms application has a business entity Order, the entity is used in multiple views, each view handles a different domain or use-case in the application. As an example, one managing orders, the other one digging into one order and displaying additional data.
If I'd use nHibernate (or any other ORM) and use one session/data...
Hello, after read this article i tried generate EF model by System.Diagnostics.Process:
Process myProcess = new Process();
var cs = "Data Source=.\\SQLEXPRESS; Initial Catalog=uqs; Integrated Security=SSPI";
myProcess.StartInfo.FileName = @"C:\Windows\Microsoft.NET\Framework\v3.5\EdmGen.exe";
myProcess.StartInfo.Arguments = ...
I am having some issues with Entity Framework in VS2010
The problem I'm getting is described very well here...
http://social.msdn.microsoft.com/Forums/en/adonetefx/thread/cacf6a76-09a8-4c90-9502-d8b87c2f6bea
It's basically happening when a Foreign key is pointed at the primary key of another table...but if I take off the StoreGenerate...
I have two tables ('keywords', 'titles') that are related via a mapping table. I am trying to return a list of Map_Keywords_Title (the mapping table's object) based on the results of a join.
Until I added the last part with typedQuery it was just returning objects of anonymous type. I want it to return items of type 'Map_Keywords_Title...
Why does .NET Entity Framework produce SQL that uses a subquery and left outer join on a simple 1-to-1 relationship? I expected to see a simple join on the two tables. I'm using Devart Dotconnect for Oracle. Any ideas?
Below is the output I see courtesy of the EFTracingProvider:
SELECT
1 AS C1,
"Join1".USER_ID1 AS USER_ID,
...
FROM "M...
Hi there,
I have the following LINQ query that I need to translate to Entity SQL /eSQL):
return (ObjectQuery<User>) from user in Users
where !user.Roles.Any(r => r.AnIntegerProperty < 0)
select user;
User.Roles is an navigation property to the n:m relation to Roles and there also is a Role.Users navigation property the other wa...
I am getting started with the ADO.NET Entity Framework 4.0. I have created an EDM and data store for the app, and it successfully retrieves entities. The application holds the EDM's ObjectContext as a member-level variable, which it uses to call ObjectContext.SaveChanges(). So far, so good.
I am going to refactor to repositories later. ...
Hi,
I'm relatively new to this stuff.
I created a .Net Entity Data Model, but three fields are missing in one of the tables. I tried creating a new one from scratch, etc.
I can see those fields in the Model Browser(when I expand Tables/Views => tablename), but not in the DataModel.edmx itself.
I'm using SQL DB.
Why can this be happe...
I've seen many examples in LINQ but i'm not able to reproduce the same result in vb.net.
I have following code:
Dim context As New MyModel.Entities()
Dim rnd As New System.Random()
Dim gardens As List(Of Tuin) = (From t In context.Gardens Where _
t.Approved = True And _
...
I'm trying to use the Repository Pattern with EF4 using VS2010.
To this end I am using POCO code generation by right clicking on the entity model designer and clicking Add code generation item. I then select the POCO template and get my classes.
What I would like to be able to do is have my solution structured into separate projects fo...
I am adding several entities to an object context.
try
{
forach (var document in documents)
{
this.Validate(document); // May throw a ValidationException.
this.objectContext.AddToDocuments(document);
}
this.objectContext.SaveChanges();
}
catch
{
// How to clean-up the object context here?
throw...
I have been fooling around with EF with a database that has implemented user-schema separation with a twist, there are multiple tables with the same name but are separated via the schema.
So like:
admin.tasks
staff.tasks
contractor.tasks
When I created my EF model I noticed that there were 3 tasks tables:
tasks
tasks1
tasks2
Is this...
Is there a way to default the scope to internal with updating an .edmx from a database? I get tired of having to go through large tables setting every getter, setter, etc. to internal instead of public
...
Hi, Does anyone know how to delete an object and all of it's related entities.
For example i have tables, Products, Category, ProductCategory and productDetails, the productCategory is joining table of both Product and Category.
I have red from http://msdn.microsoft.com/en-us/library/bb738580.aspx that Deleting the parent object also d...
I have a class I'm using to handle all my DB interaction. Basically when an instance of this class is created it creates an instance of the model, which will persist until the DataAccess object is out of scope.
public class DataAccess
{
ModelContainer model;
public DataAccess()
{
model = new ModelContainer();
}...
I've got new project on the go and I'm looking at using the Entity Framework (v4) over a WCF service.
I was wondering what peoples views are on the best way of delivering the data from EF over WCF? Should I be using the EF generated classes or wrap them up into something else?
The consuming application will be web for the moment, but p...