entity

WPF, Entity Framework, and SQLCE

Hi all I'm developing a WPF application, and some guidance would be appreciated. The application needs to store some data locally. The data doesn't need to be shared, but multiple users can log into the application, each with a different profile. Can anyone advise me on the wisdom of using the Entity Framework 4.0 with SQLCE in this con...

Best Aproach to Relate A Entity Class to the Correspoding Table in a DataBase

i want to relate each Field of an Entity Class to the corresponding datatable Field. im working on c# currently Any Suggestions? ...

Copying data across databases with Entity Framework

Hey guys, I'm trying to use the entity framework to take data (nested relationships) from one DB and insert it into another. The idea is you download the data as an XML file and then upload it and it gets inserted into the new DB. The download to XML is simple: var BoroughQuery = from b in Context.Borough.Include("User").Include("Loc...

SqlResultSetMapping with self join table

I have a query with a self join that looks like this, select t1., t2. from table t1 left outer join table t2 on t2.LFT < t1.LFT and t2.RGT > t1.RGT AND t2.REG_CODE_PAR = 'ALL' AND t1.STATUS_CODE = 'A' AND t2.STATUS_CODE = 'A' I'm using @NamedNativeQuery with a result set mapping to get the result. @NamedNativeQuery( name="fin...

OrderBy("it." + sort) -- Hard coding in LINQ to Entity framework?

Hi All I have been trying to use dynamic LINQ to Entity in my application for specifying the OrderBy attribute at runtime. However when using the code as described in the majority of documentation: var query = context.Customer.OrderBy("Name"); I received the following exception: System.Data.EntitySqlException: 'Name' could not be re...

google app engine: How do I add fields to an existent entity

I have a google app engine app where I would like to extend one of my Entity definitions. How would I ensure existent entity objects get the new fields properly initialized? Would the existent objects, the next time I query them, simply have default values? I'd like to add a StringListProperty. ...

OData Entity Framework Schema Change

I am trying to expose my database with OData. I am using Entity Framework to create the DataService. I need to add a column to one my entities, so I created a partial class of my entity, and added the property. The problem is, this new added property is not exposed to OData, is there a way to add this new column to the exposed schema> ...

Free Tagged Corpus for Named Entity Recognition

Hey guys, I am looking for a free tagged corpus for a system to train on to for Named Entity Recognition. Most of the ones I find (like the New York Times one) are expensive and not open. Can anyone help? ...

Querying for entities with missing properties in app engine Datastore?

I have a model which looks like this: class Example (db.Model) : row_num = db.IntegerProperty(required=True) updated = db.IntegerProperty() ... ... Now when i store values, I may not fill the value for the updated property every time, which implies that in some entities it may not exist. I want to construct a datastore query so ...

Entity Framework one to many relationship save problem

Hi people, I've been digging in the posts in here and on google and couldn't find anything helping me to solve a problem I have with saving children entities on an existing entity. Let's say I have a shopping cart that will hold items, that means I have a ShoppingCart entity which has ShoppingCartItem entity collection. In my contr...

Is it possible to create a Microsoft Practices Enterprise Library Data Access Block Database from a DbConnection

Hey Everyone, I have a DbConnection object (coming from an EntityFramework 4.0 context) and was wondering if it is possible to create a Microsoft Practices Enterprise Library Data Access Block Database (Microsoft.Practices.EnterpriseLibrary.Data.Database). Does anyone know if it is possible to do this? ...

How to get first EntityKey Name for an Entity in EF4

Hello, How can I get the 1st EntityKey name for an Entity for Entity Framework 4 because I'm building a repository system and I wanted to get an item by Id (which is the primary key oin EF is the 1st entitykey for the entity) I'm using this code public virtual TEntity GetById(string keyName, Guid entityId) { var ent...

Best type for IP-address in Hibernate Entity?

What is the best type for storing IP-addresses in a database using Hibernate? I though Byte[] or String, but is there a better way, or what do you use? @Column(name = "range_from", nullable = false) public Byte[] getRangeFrom() { return rangeFrom; } public void setRangeFrom(Byte[] rangeFrom) { this.rangeFrom = rangeFrom; } ...

Deleting entities strategy

In order to keep consistency in the system I can consider 2 deleting strategy: cascade deleting of all entities in relationships; emulating deletion (i.e. nothing is really deleted from DB but, for example, field deleted in the entity has value true and it affects the displaying logic). I like the second approach but I don't know ho...

Entity Framework 4 - Code First not storing inherited table separate from base table

With EF Code First CTP 4 I've created a simple project. This project consists of 2 classes, one inherited from other. I wish to store the data in separate tables, but the default of EF 4 is to map/store these two entities in the same table. With .ToTable(), I can change this behavior, but with this I have a side effect: when I persist ...

CoreData Entity Inheritance

Consider that i have two entities with following relationship: Entity A <-->> Entity B (one-to-many and inverse) Now consider that i have another entity Entity C that contains all the attributes of Entity B and some others, with following relationship: Entity A <-->> Entity C (one-to-many and inverse) Now i can improve the architec...

Dynami table names with Linq to entities?

Hello Wondered if there is a way to provide table name for linq query at runtime. I am interested in simple quert like "select * from @someTableName". I've searched a lot for the answer but couldnt find any help on the net. There was a post on stackOverflow --> link Dave Russel suggested to do: "var p = ctx.GetType.GetProperty(oNam...

Entity Framework collections binding to a ListBox to reflect changes

Hello! I'm using the Entity Framework classes to make changes to my database like this: testEntities.Products.AddObject(product); I've got a ListBox bound to testEntities.Products and it shows them correctly, but when I add a new object and I save the changes (testEntities.SaveChanges()), the product appears into the database, but the ...

Core Data: When and where are Entities loaded in the first Place?

Hello experts, I have a question about Core Data. When starting my appliction, when is my data (which is stored automatically by Core Data) loaded into the NSArrayControllers? I want to modify it in the first place before the user can interact with it. To be more specific: I have an NSArrayController for the entitity Playlist. Before t...

LINQ Entities vs Custom Entities in LINQ to SQL

I didn't use LINQ to SQL in project, I just went through a hand-on lab for Developing Data Access Logic with LINQ, one of the tasks is to create entity translator classes to translate between linq entities and business entities. I am a little confused about this because I thought the reason we use LINQ to SQL is that it can auto gener...