We have a WCF service that uses Entity Framework to query a SQL database. The WCF service is our data access layer. If any of our applications what to read/write data to and from the database, we call a method on the WCF service. The WCF service serializes the EntityObjects to the client apps.
In the client app (e.g. WPF app or ASP.NET ...
I have this code:
Category selectedCategory = (from c in DB.Category.Include("SubCategory")
join a in DB.Accessory on c.AccCatUID equals a.Category.AccCatUID
where a.AccUID == currentAccessory.AccUID
select c).FirstOrDefault();
It works fine, selectedCategory gets populated as expecte...
Hi, I'm using VS 2008 SP1. I want to create an edmx file using my existing database in Oracle 10g. I tried to add ADO.Net Entity Data Model item, but in the Entity Data Model Wizard, .NET Provider for Oracle does not show up. Can someone suggest a way to connect to existing Oracle database to generate the edmx file? Thanks.
...
I'm having trouble with refreshing objects in my database. I have an two PC's and two applications.
On the first PC, there's an application which communicates with my database and adds some data to Measurements table.
On my other PC, there's an application which retrives the latest Measurement under a timer, so it should retrive measure...
Given a simple parent/child class structure. I want to use linqkit to apply a child lambda expression on the parent. I also want the Lambda expression to be provided by a utility method.
public class Foo
{
public Bar Bar { get; set; }
}
public class Bar
{
public string Value { get; set; }
public static Expression<Func<Bar...
You know firstly Entity Framework came with Visual Studio 2008 SP1. Now it is come with Visual Studio 2010.
The question is that, what are differences between these two version?
...
Hello.
Is there any tool to generate CRUD admin site from Entity Framework Model?
Something like PLINQO has built in.
Thank you.
...
Hi
I have a .net 3.5SP1 project with EF (1 i guess). How the upgrade to EF4 occurs ? I need to target .net 4 ?
Thanks
Jonathan
...
I get the above error sometimes during the read. The exception originates from ASP.NET SqlDataReader whenever you try to read data before calling the Read() method. Since EF does all these internally, I am wondering what else can cause this error. could it be network (or) db connectivity?
thanks
...
There are situations where I only want to update a specific field of a single entity in the database.
I loaded the entities of that type into my silverlight application,
and I know they are constantly changing on the server... but there is one field which
has to be set by the silverlight client... the server will only read it.
How can I...
I am using LINQ to Entity in a project, where I pull a bunch of data (from the database) and organize it into a bunch of objects and save those to the database. I have not had problems writing to the db before using LINQ to Entity, but I have run into a snag with this particular one. Here's the error I get (this is the "InnerException", ...
Can you add an "Or" condition to an entity in the entity framework? For example something like:
Property1 == (1 or 2 or 3)
The message I get when putting the value of "1 || 2 || 3" or "1,2,3" or "1 or 2 or 3" returns this message:
condition is not compatible with the type of the member
...
I have a table in my database with a one to many relationship to another table, which has a relationship to a third table:
ParentObject
ID
Name
Description
ChildObject
ID
Name
Description
ParentObjectID
AnotherObjectID
AnotherObject
ID
Name
The objects are mapped into Entity Framework and exposed through a data access cl...
Hi,
I'm saving entities/records with the EF, but i'm curious if there is another way of doing it.
I receive a class from a MVC controller method, so basicly i have all the info: the class's properties, including the primary key.
Without EF i would do a Sql update (update table set a=b, c=d where id = 5), but with EF i got no further th...
I have been intensively studying and use ef4 in my project. I do feel the improvement that it has over version 1. But I found that I have something I cannot get around easily. Here is a list I want it to be better in ef vNext.
the model designer should allow multiple view of the same model, so that I don't need cram all my entity into ...
I've been reading Entity Framework and people were crying over why there was not implicit lazy loading or something. Basically I've been searching things about Lazy Loading and now I know what it is : It is a design pattern which allows us to load objects when they are really needed.
But what is the difference between Explicit Lazy Loa...
protected IEnumerable GetPersonalsData()
{
// List<Personals> personel;
using (FirmaEntities firmactx = new FirmaEntities())
{
var personeldata = (from p in firmactx.Personals select new { p.ID, p.Name, p.SurName });
return personeldata.AsEnumerable();
}
}
I want to send GetPersonelData() into GridView DataSourc...
There have been many question on managing EntityContext lifetime,
e.g. http://stackoverflow.com/questions/813457/instantiating-a-context-in-linq-to-entities
I've come to the conclusion that the entity context should be considered a unit-of-work and therefore not reused. Great.
But while doing some research for speeding up my databas...
Hi,
I just found out that lazy loading in Entity Framework only works from the thread that created the ObjectContext. To illustrate the problem, I did a simple test, with a simple model containing just 2 entities : Person and Address. Here's the code :
private static void TestSingleThread()
{
using (var context = new Te...
I'm gonna start a new project soon, using .Net 3.5 and Winform on an Oracle database. We were planning on using an ORM. NHibernate was suggested by our architect. Since I'm personally more familiar with Entity Framework, I thought it would be easier to use than NHibernate. But since there isn't any official provision from Oracle, we are ...