|
Hello. i got some problems using EF with AutoMapper. =/ for example :
i got 2 related entities ( Customers and Orders ) and theyr DTO classes : class CustomerDTO { public string CustomerID {get;set;} public string CustomerName {get;set;} public IList&...
Started by vbobruisk on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Adapter-for-entity-framework-v1.aspx.
|
|
How to remove one entity in list and add the another entity in same list in c#
Started by ratty on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Var yourList = new Collection<EntityType>(); yourList.Remove( entity ); yourList.Add( otherEntity );
or replace by:
yourList[yourList.IndexOf( entity )] = otherEntity;
Suppose you have, and pass as an argument the SelectedItem property....
|
|
I have two tables FilesystemEntries and CacheEntries where there is an association of 0..1 CacheEntry per FilesystemEntry (that is a FilesystemEntry can have a null CacheEntry, but not vice-versa). Initially, the CacheEntry for all FilesystemEntries is...
Started by Robert Fraser on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Alex
I may be wrong, but unless I'm misunderstanding your entity relationships, you might try.
|
Ask your Facebook Friends
|
What's the purpose of entity sql, i mean if you have linq to entities why would you need to write queries in string, are there any performance reasons or something ?
Started by Omu on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Being able to "reach into" the database is sometimes necessary for advanced queries, either to pull them off in the first place or to improve the sometimes horrible choices... .
LINQ to Entities does not allow you access to every feature of your database.
|
|
The JPA tutorial states that one can have a non-entity that extends entity class:
Entities may extend both entity and non-entity classes, and non-entity classes may extend entity classes. - http://java.sun.com/javaee/5/docs/tutorial/doc/bnbqa.html
Is ...
Started by MichaĆ Minicki on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
"An entity class must follow these requirements: * The class must be annotated with the javax.persistence.Entity annotation."
If a class is a non-Entity, then it is a non-Entity so is not persisted as an Entity....
Read that link again.
|
|
When I annotate a class with @Entity and try to resolve the dependencies, I get to choose the package between two different packages, javax.persistence.Entity and org.hibernate.annotations.Entity
The javax package is JPA's entity-annotation, but why is...
Started by Kim L on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Like this:
@Entity.
And get an Unknown entity exception
Always import @javax.persistence.Entity it, you must use hibernate specific extension found in their own annotation.
|
|
Hello, I'm new to EF and I've been using the asp.net mvc databind method to update my models "tryupdatemodel", now I have to update a entity from a service layer, since TryUpdateModel is a asp.net mvc method I can't use it in the services layer.
What ...
Started by Rick on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
There's no automatic way for doing that, you must load the entity from the database and update entity = Service.Get(id); //get updated entity TryUpdateModel(entity); if (ModelState.IsValid) Service.Save(entity); //here....
|
|
I'm building an ASP.NET MVC site using the ADO.NET Entity Framework. I have an entity model that includes these entities, associated by foreign keys:
Report(ID, Date, Heading, Report_Type_ID, etc.)
SubReport(ID, ReportText, etc.) - one-to-one relationship...
Started by Tim Rourke on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Make sure it is being retrieved from the database by its entity key and properly attached.
|
|
I have an ASP.NET application that uses a layered architecture e.g. presentation layer, business logic layer, data access layer.
I don't want to the business layer to have to know anything about how the data access layer is implemented and I'm not looking...
Started by AJM on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Not with entity framework, but I had tried to create a sample with two insert stored procedures being?ReleaseId=1580
The tool generates classes that have no entity framework dependency that you can pass.
|
|
I am loading a graph of related entities from the database using ADO.NET MVC and the Entity Framework. One of the entities needs to be modified in memory, but not have changes persisted back to the database when other entities in the graph are changed...
Started by Justin on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
That's the Entity Frameworks "Platinum rule" :
When I first noticed that an entity had been attached to the ObjectContext even though I hadn't explicitly called for this in my code, I was a little taken aback because....
Either disconnected.
|