4
голосов
6ответов
6582 просмотров

Entity Framework v2 doesn't support sql 2000?

I installed the beta 2 of Visual Studio 2010 today. I went to test out the new entity framework stuff (to see if my "issues" from v1 were fixed.). I started adding a new connection string, but when i put in my information for sql 2000 it said "this server version is not supported. you must have...

0
голосов
1ответов
502 просмотров

Ado Entity Framework Adding Data

I'm having a little trouble with my Entity add functionality. Setup For simplicity, I have in DB with 4 tables, Customer, Address, Area, Location. Customer stores basic customer details ie. Id, Name, Username, Password, etc. Address stores street name, street number, etc. Area stores area nam...

0
голосов
2ответов
499 просмотров

Char datatype in relationship entity framework problem

I have a 3rd party database where the primary key is a char datatype. When I run my query, I use an include to include the child table. The count is zero though. I look at sql profiler and results are returned. The only thing I can see is an issue with the relationship columns being char. Any...

2
голосов
2ответов
1522 просмотров

Why is Entity Framework ignoring the Take() method when generating SQL?

I am using the .Skip and .Take methods with Entity Framework. The .Skip call is being honored when generating the SQL. The .Take is not. This code: public IList<DocPullRun> GetDocRunsPaginated(int startRowIndex, int maximumRows) { Logger.Debug("GetDocRunsPaginated: star...

0
голосов
1ответов
2203 просмотров

Retrieve data from two tables in asp.net mvc using ADO.Net Entity Framework

Please read my question carefully and reply me. I have two tables as table1 and table2. In table1 I have columns as AddressID(Primary Key),Address1,Address2,City In table2 I have columns as ContactID(Primary Key),AddressID(Foriegn Key),Last Name,First Name. By using join operation I can retri...

0
голосов
1ответов
469 просмотров

TM1 API for LinqToEntities

IBM Cognos TM1 is a multidimensional database that my company thinks is the latest and greatest. I've been to the classes and, sure, it is nice for analysis. Of course the finance people in my company only see the Excel Add-In or Excel-like website and think "that's all I need for a data entry ap...

1
голосов
2ответов
1592 просмотров

Backup and Restore through the Entity Framework

I'm working with an SQL Server database with about 50 tables and plenty of relationships between those tables. I have already written a backup and restore function which will retrieve all data from the model, export it to XML which it could then import again into a clean database. But maintaining...

0
голосов
1ответов
242 просмотров

How to use Entity context in entity class for performance?

Suppose I have project MyData, then I add MyDb.edmx with EF wizard. In My database, I have table Person. Then I will get an entity Person in EF model. Then I want to extend this Person by partial class in a separated file person.cs like: namespace MyData { public partial class Person ...

1
голосов
2ответов
2256 просмотров

.Net Framework Data Provider not found on host

I have a working web site using Linq to Entities, on a MySQL database. Last night I installed the MySQL connector 6.0 for .NET, and all was good on my local machine. I assume I now have some GAC to Bin migration to do on the host. Does anybody know what files I must transfer and what I must do...

123
голосов
6ответов
69964 просмотров

It has a DefiningQuery but no InsertFunction element... err

This thing is driving me crazy, and the error is quite meaningless to me: Unable to update the EntitySet 'TableB' because it has a DefiningQuery and no element exists in the element to support the current operation. My tables are put like this: TableA int idA (identity, primary key) ... Ta...

0
голосов
2ответов
629 просмотров

Binding entities with foreign key to datalist

I have the following code: var devices = from d in ctx.Devices.Include("DeviceGroups") where d.DeviceEnabled == true select d; dlTerminals.DataSource = devices; On the front end I do the following: <asp:DataList ID="dlTerminals" runat="server" DataKeyField="DeviceId" GridLines="Non...

2
голосов
3ответов
698 просмотров

database relationship to many tables and representation in entity framework

2 part question: 1st What is the best way to setup a table/relationship structure given the following scenario: I have many tables that store different kinds of data (ie: books, movies, magazine - each as different tables) and then one table that stores reviews that can link to any of the table...

1
голосов
1ответов
2129 просмотров

How do I create a read only entity in the entity framework?

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. At this time I have attempted to use the Me...

5
голосов
2ответов
7002 просмотров

Can Entity Framework deal with multiple result sets (each from joined tables) from a stored procedure?

In Linq to SQL, I can't find an easy way to deal with multiple result sets returned by a stored procedure where each result set is from table joins. Each result set does not map directly to a table. (can't change this behavior). For now, it seems using a DataSet is a lot simpler. Can the current...

0
голосов
1ответов
128 просмотров

How to use entity framework inheritance?

First off I'm a noob so please be gentle :-) I have a base object Company. I want to inherit this into a Customer object and a Vendor object. My problem starts with the fact that a given company can be a customer and a vendor at the same time. All the examples I have seen a use a property of the ...

2
голосов
3ответов
13073 просмотров

SQL Server Compact Edition with Entity Framework

I try to use SQL Server Compact Edition with Entity Framework in Visual Studio 2008 SP1. Here's what I do: 1) I create a new project, of type Console Application. 2) I right-click on the project, select Add->New Item. 3) I choose to add a Local Database called Something.sdf 4) In the next ...

0
голосов
3ответов
1547 просмотров

How can I get an instance of a base class from an inherited class dynamically?

I've got a class public class foubar : fou fou has its properties and so does foubar I've created an instance of foubar and set values to all the properties including the base classes'. Now I need an instance of fou that has the property values that are in foubar. True, I could create a new inst...

2
голосов
2ответов
836 просмотров

Does ADO.NET Entity Framework have a construct similar to LINQ to SQL's GetTable<t>?</t>

Does ADO.NET Entity Framework have a construct similar to LINQ to SQL's GetTable? I'm trying to do something similar in Entity Framework, that I'm very used to doing in LINQ to SQL. Does ADO.NET Entity Framework have the same capability? LINQ to SQL: dataContext.GetTable&lt;T&gt;(); It would...

2
голосов
1ответов
701 просмотров

When IQueryable is created from a linq query why is it not a "new" variable?

I am using the Entity Framework and have got a loop that looks at a set of People and using a foreach loop creates a query for the address of each person. As each address query is created it is added to the node of a treeview where it can be later used (to populate children nodes): IQueryable&l...

4
голосов
4ответов
8726 просмотров

Entity Framework ObjectContext -&gt; raw SQL calls to native DBMS

I have an app using the ADO.NET entity framework (the VS2008 version, not the newer, cooler one) and I need to be able to make a call down to the underlying DBMS (it's postgres) in order to call some SQL that Entity Framework doesn't support. Is there a way to go from an Entity Framework Object...

0
голосов
1ответов
213 просмотров

Visual Studio Model Won't Show SOME New Tables

I added some tables to my DB, and refreshing the model didn't work. So I deleted my .edmx file completely. I then recreated the model according to my updated DB, but the same tables were still missing. I'm not really sure why, but for some reason it won't load certain tables into the model. I...

3
голосов
1ответов
498 просмотров

How closely aligned is the Repository patten with either Unit of Work or ActiveRecord

Although I'm not doing full blown DDD, I find the repository pattern appealing and I do try to segment the repositories along aggregate-root boundaries. I'm implementing repositories on top of the Entity Framework, and here the ObjectContext allows for a unit-of-work style as it tracks changes t...

1
голосов
3ответов
1278 просмотров

Low-level SQL optimisation with Entity Framework

In the past when working with databases I've found it necessary to do low-level tweaks to the query, for example providing hints to the optimiser that it should use a particular index or join order. We are currently considering rewriting our data layer using Entity Framework; is it the case that ...

0
голосов
1ответов
3642 просмотров

Binding WPF ComboBox to entity

Ok, Ive searched the heck out of the Interwebs and can't seem to find this right. I have a ComboBox that is bound to a CollectionViewSource of EntityFramework entities. The display is a template that shows the first/last name. The problem is, when an item is selected, the Display of the combob...

0
голосов
1ответов
731 просмотров

ObjectQuery<t> without Entity Framework</t>

How to use ObjectContext and ObjectQuery&lt;T&gt; with my own classes and objects? I.e. I don't want to use them with Entity Framework. How can I do this?

2
голосов
3ответов
1708 просмотров

Where "ADO.NET Entity Framework" files in 3 layer architecture?

If I use ADO.NET Entity Framework in our project and we depend on a 3-layer architecture pattern that we have ( presentation layer - business layer - data access layer ) a project for each layer. So when I make an entity model file where can I put it in the DAL or BL? If I put it in the DAL and...

4
голосов
3ответов
21586 просмотров

Entity framework with "Group By" and/or "Order by"

Say we've got a project that allows user to download things. On the main page, I want to show the Most downloaded files ordered by the number of download! All that using EF. How can i do this !! I've tried many things with Group By (Its a nightmare when you've got a lot of informations in an obj...

3
голосов
2ответов
471 просмотров

How do I Unit Test a function that inserts a record into a RIA Services DB?

This is a sample function that works with an entity, saves it to a db and then causes problems because we can't write a Unit Test for it. Check it out: // this class exists in a Silverlight Class Library public class EmployeeSaver { .... public void Go() { Employee e = new ...

0
голосов
1ответов
531 просмотров

How do I update an Entity Reference using a SelectList in edit form? (asp.net mvc)

Just trying to figure out how do achieve the following: I have an edit form, and a simple viewmodel for said form. The viewmodel contains an entity and then a few SelectLists for dropdowns. The problem is this: The entity in question has a related entity (which is called room). I want the user...

0
голосов
1ответов
325 просмотров

Ado.net entity data model doesn't exist

I've intalled vs2008 ts on my windows 7 x64 pc, but when I tried to add ado.net entity data model there is no template for it. All the MSDN tutorials say that vs2008 has it.