Hi,
I have the follwing method.
public List<MyEntity> GetMyEntities(MyObjectContext objCtx)
{
using(MyObjectContext ctx = objCtx ?? new MyObjectContext())
{
retun ctx.MyEntities.ToList();
}
}
The idea is, user of this method can pass in the objectcontext if they have. If not then a new objectcontext will be c...
I attempted to add a ADO.NET Entity Data Model to my Visual Web Developer 2010 Express project and it generates but returns a whole slew of errors. Why is this generating errors? Here are the main errors:
'Public Property ID As Integer' has multiple definitions with identical signatures.
Method 'Onaddress_IDChanging' cannot be declared ...
I have a GridView in my ASP.NET application that takes data to be rendered from EntityDataSource. GridView allows user to select rows. I want to get the entity that corresponds to the row user selected. I can get from GridView the ID(primary key) of the entity that corresponds to the row selected. How can I get the Entity that has partic...
I have an application where I have a generic object (table) called Hull. Each hull in the table is unique.
I have another object that has three hulls, but they are specifically the Port_Hull, Center_Hull and Starboard_Hull.
Rather than create a One to Many relationship, I was trying to create a one to one relationship for each one,...
My Flex application uses a client-side pimento EntityManager which fetches quite a few objects and associations. It does this by forcing eager fetching of particular association ends in the form of fetch plans. I would like to update the client whenever a change has been made to an entity existing in the EntityManager's cache. Is it poss...
Hello,
I am using http://loungerepo.codeplex.com/
this library needs a unique id when I persist my entities to the repository.
I decided for integer not Guid.
The question is now where do I retrieve a new integer and how do I do it?
This is my current approach in the SchoolclassAdministrationViewModel.cs:
public SchoolclassAdminist...
Hi.
I'm wondering if it's possible to bind a gridcolumn (field) to a method or function of an entity?
For example I have two entities Person and Company that both inherit the abstract entity Addressee. In my grid I'm listing all Addressees (both persons and companies). I have a column, Name, in the datagrid that I whish to bind to a f...
I'm having a problem where the entity manger is persisting an entity that I don't think has changed during the flush.
I know the following code is the problem because if I comment it out the entity doesn't persist. In this code all I'm doing is loading the entity and calling some getters.
Query qry = em.createNamedQuery("Clients.findBy...
I've been working with Seam and JPA/Hibernate for quite some time, but have just started looking at making use of the EntityHome and EntityQuery classes more. EntityHome seems relatively straightforward in terms of what it is and how I can leverage it. But, EntityQuery is a bit less clear.
I understand the ability to grab, for example...
Hi,
I have an EF project which has embedded connection details.
Then when I use this project from a client library I get told to copy the config file across, which includes the connection details.
What are the rules re which connection string would be used here? i.e. does the database connection string in the client project override ...
Hi,
I have traced an issue with an application I am developing, it is giving me a type cast exception. Funny thing is it is saying it cannot cast "entities.Movie cannot be cast to entities.Movie"?! movies is an ArrayList.
try {
movies = getMovies();
} catch (Exception e) {
e.printStackTrace(System.out);
} fi...
I'm trying to read in an xml file which looks like this
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE dblp SYSTEM "dblp.dtd">
<dblp>
<incollection>
<author>José A. Blakeley</author>
</incollection>
</dblp>
The point that creates the problem looks is the
José A. Blakeley
part: The parser calls its character han...
How can I get all entity kinds from GAE server?
Is this possible?
I want to make a DB manager tool for GAE.
...
Hi,
I want to have following type of query in entity frame work
SELECT c2.*
FROM Category c1 INNER JOIN Category c2
ON c1.CategoryID = c2.ParentCategoryID
WHERE c1.ParentCategoryID is NULL
How to do the above work in Entity framework...
...
Same as Title.
Has anyone found a way to make the ADO.NET Entity Framework work with OLE DB or ODBC data sources? Specifically, I need to work with an SqlServer2000.
...
I have a windows service that runs every 10 seconds ... each time it runs, it takes some test data, modifies it and persists it to the database using the EntityFramework. However, on every second run, when I try to persist the change I get the following Optimistic Concurrency Exception:-
Store update, insert, or delete statement affe...
Hi,
I have a ASP.NET web application that use the same DataContextType to access several Databases with the same schema.
A problem I have is that I'd like to reference the origin Database of entities by adding to them a property (e.g. a ConnectionString property) and auto assign it on entity creation.
I though it could be done easily...
Is it possible to create an EntitySet with a conditional mapping other than Value or IsNull?
Suppose we have have a Product object with a field DateTime Expiration. I want to have ExpiredProducts and ActiveProducts based on Expiration>DateTime.Now so I can query like this:
var expired = from p in ExpiredProducts
select p;
...
Hi,
By virtue of my application, I need to seperate my business entities from the entities created by EF4. I need to restrict the entities to only access the repository from where they are translated (using translator) to business entities shared at business and service layer. I thought of restricting them by specifying them as internal....
I'm working on a rather large DocBook XML document. The main book has the chapters but includes all the subsections by reference using entities. Something like this:
main.book.xml:
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
[
<!ENTITY section1 SYSTEM "../fragmen...