Hi,
I am using EF4 and I am getting an error with my custom property. I have 2 properties in my Application class, namely Initials and Surname. It is a partial class. I created a custom property in my Application class called Owner, and it looks like this:
public partial class Application
{
public string Owner
{
get
...
Hello, I'm using Entity Framework in my project. The Framework has created its own connection string, so my web.config connectionStrings section file looks following:
<connectionStrings>
<add name="ApplicationServices" connectionString="data source=TEST186;user id=vnkuser;pwd=vnkuser;initial catalog=VNK" providerName="System.Data....
I have a database with many tables, views and sprocs. If I try to create a data model that includes everything, it errors out on the creation of the class file. If I try to create a model with just the views, it works fine. Is there a limit or is there something in a config file somewhere that needs to be tweaked?
...
I'm studying MVC and EF at the moment and I see quite often in the articles on those subjects that controller manipulates data via a Repository object instead of directly using LINQ to Entities.
I created a small web application to test some ideas. It declares the following interface as an abstraction of the data storage
public interfa...
OK, I have 3 tables, call them:
Person
PersonID
Name
Store
StoreID
Name
PersonStore
PersonID
StoreID
Now, I have a form which allows you to add stores to a person. However, I am getting the store ID back from the form. I don't really want to do a query to get the store object from Entity Framework. I just want to add to t...
Is it possible to return nested complex types from multiple different Stored Procedures using EF? (e.g. ClientSelect, ClientAddressSelect)
I have imported a few stored procedures and added function imports and created a Complex Type for each of the return types. (e.g. Client and ClientAddress).
Now, for example, I want to add the Clien...
I would like to create a compiled query which uses reusable where predicates. An example to make this clear:
ObjectContext.Employees.Where(EmployeePredicates.CustomerPredicate)
EmployeePredicates is a static class with a property CustomerPredicate that looks like this:
public static Expression<Func<Employee, bool>> CustomerPredicate
...
I am trying to simply update the entity object and I get this error.. All the googling on the error I did takes me to complex explanations... can anyone put it simply?
I am working of of this simple tutorial
http://aspalliance.com/1919_ASPNET_40_and_the_Entity_Framework_4__Part_2_Perform_CRUD_Operations_Using_the_Entity_Framework_4.5
...
I'm kind of stuck working out where I'm going wrong with the below entity framework mapping. What I've done is:
a) created a Sqlite database (see below, noting Sqlite doesn't allow FK constraints)
b) created a blank Entity Data Mode & then created the model from the database
c) issue is then trying to add the Model association so it pi...
Where<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate);
I pass parameter to Where method as follows: "f => f.Id > 4".
Can i pass a delegate method instead of "f.Id > 4"?
...
Hi everyone!I have a web application where i need to use entity frame work.Actually i came to know that Entity follows 3 layered model.So is it mandatory to use again 3 layered model while using entity?Can any give your valuable idea's and link's regarding this.
...
I have a couple of queries with regards to entity framework:
My database has over 100 tables including of master, lookup and child tables. One operation of save may save data in 25 different tables. I am trying to figure out the best possible way to organize my entities. Whether I should do table wise or should do it operation wise. Do...
What is the best practice for pagination in Entity framework?
Should one hit database twice, one to get total record count and second to get the records?
Thanks in advance.
...
Using the following database table structure:
Order Table:
OrderId
OrderName
OrderItem Table:
OrderId
ItemId
Item Table:
ItemId
ItemName
I have an 'Order' entity that has an 'Items' collection. What I need to do is return all orders that contain certain items. Example: All orders with items with id: 1, 4 and 5 (I don't care if it ha...
Hi
Given the following
Expression<Func<T,bool>> matchExpression;
How can i create another expression that is a 'not' of the existing one.
i have tried
Expression<Func<T, bool>> func3 = (i) => !matchExpression.Invoke(i);
but this is not supported by the entity framework...
Regards
...
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 ...
I get "'System.Windows.Data.BindingListCollectionView' view does not support sorting." when I use the following CollectionViewSource:
<CollectionViewSource Source="{Binding Path=CourseSessions}" x:Key="cvsCourses">
<CollectionViewSource.SortDescriptions>
<ComponentModel:SortDescription PropertyName="StartDate"/>
...
I am trying to do something like this:
ViewData.Model = _db.Questions
.Include("QType")
.Include("QTags")
.Include("SubQuestions.Options")
.Where(q => q.Active == true)
.Orderby(q => Questions.Order)
...
What do the people mean when talking of the plurality naming "problem" in context of Entity Framework?
...
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...