I've got a model set up in the Entity Framework (EF) where there are two tables, parent and child, in a one to many relationship. Where I am having trouble is writing a query with linq where I am trying to retrieve a single instance of the parent while filtering upon a field in the parent and another field in the child. It would look s...
Hello,
I have a problem using a transformer to generate an XML document.
The incoming org.w3c.dom.Document has the entity codes correct:
®
However, once the Document is transformed the ampersand is encoded:
®
I was expecting ampersands followed by a # to have been respected, but I guess perhaps this is correct behav...
Hi,
I have any application class. Entity framework created a navigation property called Assistants. When I run my web application Assistants is populated for me by the framework. I wrote a stored procedure called GetAssistantsByApplicationID. I need to map this stored procedure to the Assistants property and pass it the application ...
Hi i have a entity that cold Users that have a navigation property UsersData that have a field "LastLoginDate" what i want to do is use EntityDataSource to display some information of the users inside a GridView (I don't want to do it from code behind with linq) . I tried to use Include property of EntityDataSource but i don't know how u...
Hi,
When I set where clause of a EntityDataSource which contains a unicode column name, this exception occurs:
The simple identifier 'عنوان_قرارداد'
must contain basic Latin characters
only. To use UNICODE characters, use
an escaped identifier. Near line 6,
column 4.
and this is a part of my code:
GridDataSource.Where = "...
Is it possible to generate an Edmx file by creating the collections (schema, conceptual, mappings) and mappings in code and building it up in C#?
Note - I've used EdmGen and EdmGen2 which read from a database to create the Edmx. I want to be able to pass the specific items into the metadata without pointing at a database.
Any ideas appr...
Hi,
I am using EF4 and I used the POCO entity generator to create my entities. I have a stored procedure called UpdateApplicationState. I pass it just 2 parameters called ApplicationID and ApplicationStateID. It returns nothing so I set the return type as None. I only want it to update the application state ID, nothing else. When I...
Hi All,
I'm having a problem with creating a one-to-many(or one-to-one?) relationship in entity framework (3.5 I believe).
Example tables/models:
Settings:
SettingsID pk int not null
SettingsName varchar(250) null
SettingsTypeID fk int null
SettingsType:
SettingsTypeID pk int not null
SettingsTypeName varchar(250)
...
I have searched stackoverflow on this problem and did find a few topics, but I feel like there isn't really a solid answer for me on this.
I have a form that users submit and the field's value is stored in a XML file. The XML is set to be encoded with UTF-8.
Every now and then a user will copy/paste text from somewhere and that's when ...
Hi,
I've got a table that stores inventory for a store that looks like this
InventoryId int
ParentId int
ShortDesc int
...
[other product data]
...
A TShirt will exist in the table with a ParentId of -1. Any variations of size and colour will exist in the same table with the original parent InventoryID in the ParentID f...
My database has a 'LastModifiedUser' column on every table in which I intend to collect the logged in user from an application who makes a change. I am not talking about the database user so essentially this is just a string on each entity. I would like to find a way to default this for each entity so that other developers don't have t...
Hi i have a problem that only shows if EntityDataSource present on aspx pages ,interesting thing it's just occures when i'm refreshing the page (F5) or viewing it again and it's driving me crazy it's seems to be a bug with entity framework because i tried it with another project and i just get the same error:
Please if anyone can help me...
I have a few entities I'd like to update at the same time. However I'd like to write individual update methods in each classes partial class file, for each entity and call them all at the same time. For example:
public sub UpdateEntity1()
...
end sub
public sub UpdateEntity2()
...
end sub
public sub UpdateEntity3()
...
end sub
pub...
I asked here a while ago for some help in understanding MVC, since I'm very new to the topic. I thought I had a decent understanding of it, and this is documented in a blog post I wrote recently on the subject. My understanding basically boils down to this:
Controller: Determines what needs to be done to fulfill a request, and utilizes ...
Is there a way to auto generate form fields at design time from data source?
I know I could do it at run time by dynamically appending controls, but I want to generate these controls at design time and position them accordingly.
thanks
...
Hi ..
I built this SL4 project .. and it was working perfectly, after while I re-opened the project and pressed F5 to try it again.
After I add new item in Data Form, filling the required field and doing "SubmitChanged()" I get "Code : 4004 error message" .
I'm using Entity Framework + RIA services, I used EF profiler to see if the Li...
Hi,
right now i try to implement the Inheritance property of the Entity Framework.
I have two table in the database : DocumentLine and DocumentLineBudget.
in EF designer, I will make the DocumentLine as a base class. The DocumentLineBudget as a derived class from the DocumentLine.
Because of the Inheritance, there will have no availabil...
Hi,
I'm using entity framework 4.
I have a stored procedure that just updates one value in my table, namely the application state ID. So I created a stored procedure that looks like this:
ALTER PROCEDURE [dbo].[UpdateApplicationState]
(
@ApplicationID INT,
@ApplicationStateID INT
)
AS
BEGIN
UPDATE
[Application]
S...
Hi All,
M using entity framework, my problem is,
entity object say "Employee" mapped with SP to insert emplyee."employee" entity has the properties mapped with Employee table of DataBase, i used these properties for SP parameter mapping, but my sp needs some more parameters which are not available in entity and if i scaler property for...
I have business logic that could either sit in a business logic/service layer or be added to new members of an extended domain class (EF T4 generated POCO) that exploits the partial class feature.
So I could have:
a) bool OrderBusiness.OrderCanBeCancelledOnline(Order order) .. or (IOrder order)
or
b) bool order.CanBeCancelledOnline(...