What statements does Linq to entities support?
Does anyone know where I can get a full list of supported statements for linq to entities, this is statements that will be translated and run on the database...? ...
Does anyone know where I can get a full list of supported statements for linq to entities, this is statements that will be translated and run on the database...? ...
Hi, Got a question about Entity Framework and MyIsam tables. My production database consists of MyIsam tables only. Often with a primary key like UserId and then a secondary KeyId that is auto incrementary. Since secondary auto incremantary keys are not allowed in InnoDb, and there will be ALOT of work to get rid of them before convert...
Hi, I'm new with EntityFramework. My application has a pool of context object instances (Each context has 1 connection to the DB). The problem is that when I update an object (and calling SaveChanges), the data is updated in the DB and in the updating context but when I select from other instance, it gets the old data of the selected ...
Hi, I have table with sequence and trigger so it creates new id when inserting it to the DB. How can I get the new object id, before calling SaveChanges()? I need this id for the links between the new object and other objects. I want to do it before calling SaveChanges because I want to have the option to rollback. Can someone solve...
Within EF4, it's pretty easy to map a stored procedure into an entity. I create the stored proc, Add it to the model, then do a Function Import and specify the parent entity. Now, the rub comes in that I want my stored proc to do "eager loading" of the children entities. In effect, I have a table Parents and a table Children, with a o...
I don't know why it's is error on SaveChanges(), i search in google, some body say using EF, the database's table such have primary key, i have this, but still error. The error message is not enough clear,it just throws System.Data.UpdateException. The Code: public static void AddAccount(int _acc_id,string _name) { dataEntities de =...
I have service classes based on Entity Framework 4. I'd like to test them on a database filled with pre-generated sample data. The problem is: I would like the tests, whether passed or failed, to not actually touch the database, so that it may be re-used for other tests. Thus I'd like ObjectContext.SaveChanges to pretend that everything...
Call SP in EF 4.0 in following code: public IQueryable<Employee> GetEmployeesByFollowup() { var results = from p in this.ObjectContext.SearchEmployeeFollowup() select p; foreach (Employee p in results) { p.DepaermentReference.Load(); ...
I was checking 2nd edition of Professional ASP.NET MVC and realized EF replaced LINQ to SQL. I am familiar to LINQ to SQL from the first book but I know nothing about EF. Anyway while reading the code, it seems like nothing has changed except the name. Same old repository, same old functions. I did a little research. I know LINQ is not...
Hello, I have a thought provoking question, in relation to the use Entity Framework (EF) to persist data. My (intended) application is not a typical LOB scenario where the standard CRUD operations are done on individual records. Instead, what I would like to use the data stored within my entities, create some Matrices by combining the ...
Hi All, We tried using the below code snippet but showing the syntax error. var query = (from def in entity.Defect.Where("Owner == @0", "rochs") select def).ToList(); Thanks in Advance ...
Hi, I'm using entity framework with oracle DB. I tried to use transaction scope (because I want the option to rollback): using (TransactionScope ts = new TransactionScope()) { ..... } The problem is that when I'm trying to query inside the using statement, an exception is thrown: "Unable to load DLL 'oramts.dll': The specified...
I have a web service that exposes operations to and from a database. I'm using Entity Framework 4 for the DAL. I'm wondering what would be the best way to handle operations to and from the database. Would it be best not to keep alive an instance of the ObjectContext and instead create one for each operation done to the database? This se...
Hi! I've a WCF Service, that uses entity framework (with POCO objects). One methods returns a list of users. It was working correctly, but another method cannot insert anything because the database wasn't having "IDENTIY" setted on the primary key. Since I've done that, regenerate the EDMX model, I've a problem to get my list of user...
I'm developing an asp.net application that has some potentially large data tables. I would like to know what would be the best way to define a primary key. I know this has been asked before, but since this is for a specific situation, I think the question is valid. I'm using Entity Framework 4 on a SQL server 2008 database. What are th...
Anyone figured out a good way to pull encrypted values from db through entity framework 4? I got a MySql db with some columns encrypted with des_encrypt and need to be able to get those values as easy as possible, and also of course, update and insert them. I think it's quite strange there doesn't seem to be in built support for this i...
Consider the following rows in a database: Id | Parent __________________ 1 null 2 1 3 2 4 3 5 null 6 5 Each Id that has a null Parent is the "Owner"/"Super Parent". What would be the best approach, performance wise, to collect the parents and their children ? Shoul...
I have Entity1 with properties Entity1.id= 1; Entity1.a = 10; Entity1.b = 123; Entity1.c = 231; I wan't to change properties but to insert a new row on context.SaveChanges() not to do update for existing id. I tried to set Entity1.entityKey = null but it fails. Any ideas? Thanks. ...
Hi, Im tring to implement some generic logging in the entityframework 4.0 using the SavingChanges event in the entity context. I want to record details about any create/ update and deleted records including the id of the record being changed (which is always an int identity field). During the update and delete processes I can get the ...
Entity Framework 4: Following code cause entity Employee property changed: var results = from p in this.ObjectContext.SearchEmployeeFollowup() select p; List<Employee> temps = new List<Employeer>(results); But I don't want the property changed event fired at this time. How to resolve this issue? ...