Use Entity Framework Or Linq To Sql For New Mvc Project?
Oct 29, 2010
I have a new project where I want to use MVC (I will be learning as I code), and I have never used linq or entity (or mvc). Which should I use? Does it matter? I will be having a lot of different databases, from Oracle to FoxPro.
View 6 Replies
Similar Messages:
Mar 21, 2011
Whats the best method to use with MVC? Entity Framework or LINQ to SQL?
View 4 Replies
Aug 5, 2010
Im working on a greenfield project and have to make a decision on the technology we'll use for the data access layer. Ive used LINQ to SQL for a few years and am happy and comfortable with this, but now with entity framework available this is another method to consider. Are there any pitfalls using entity framework as opposed to LINQ to SQL ? Ive read that there are performance issues with entity framework, is this true? Id really like to get an overall feel for using one method over the other, anyone have any thoughts/comments/recomendations?
View 1 Replies
Dec 15, 2010
I'm trying to learn MVC. Now I wonder whats the different between entity framework and LINQ TO SQL? Wich is the best to use and why?
View 19 Replies
Dec 6, 2010
Im new to development for the windows server platform. Can someone tell me the difference between Linq to SQL and EF4?
View 2 Replies
Mar 22, 2011
I added an Entity Framework class (EDMX) in my MVC project but the entity collection namespace is not referenceable from my controller class, consequently I cannot access any of my entity objects.
View 9 Replies
Oct 8, 2010
Can i use Ado.Net Entity Framework in SmartDeviceProject in Vs2008?
View 2 Replies
Oct 11, 2010
what is diffrence between Entity Framework and LINQ to SQL i cant yet find a good blog on this i have read that in LINQ to SQL only one to one mapping is possible but Entity Framework allowes many , is it right? if so i dont understand this
View 3 Replies
Oct 26, 2010
Could any one explain me which ORM is best?
View 3 Replies
Sep 18, 2010
When do I need (/ best practice) to use views and stored procedures in my database when using linq with the entity framework?
View 8 Replies
Jan 18, 2010
I am tasked to build a web 2.0 style mashup application which consumes a lot of 3rd party webservices like youtube and twitter. There are also lots custom features which are going to be built using ASP.NET 3.5 and SQL Server 2008. Now I am looking for the right ORM for my needs. From a performance and ease of use standpoint can anyone suggest me the right ORM for this kind of web application?
View 1 Replies
May 17, 2010
i have 2 table missions and missiondays with a relationship 1..n
I want select all missions that has all missiondays with an attribute called "visible" = true
I've tried with:
db.TDP_Missioni.Include("TDP_MissioniDestinazioni").where(p => p.TDP_MissioniDestinazioni.visible == true)
But there is an error. Indeed from p.TDP_MissioniDestinazioni i don't see the table's attributes. I think it's because the relationship is 1..n.
View 2 Replies
Oct 13, 2010
Best way to show the SQL trace of a LINQ query to Entity Framework 3.5? I am using ASP.net and EF 3.5.
Dim dbo As Web.Portal.RBMEntities = New Web.Portal.RBMEntities
Dim Query = From RoleAllocations In dbo.RoleAllocations Where RoleAllocations.user_id = _ID And RoleAllocations.expire_date > Today Select RoleAllocations
Console write the SQL trace?
View 2 Replies
Sep 30, 2010
I have a question about Entity Framework. answer if you know answer on this. I have such query :
[Code]....
Particularly I want to join few tables in one query, but I can NOT use LINQ and can NOT use ObjectQuery with objects mapped to DB fields inside my query. Because each entity creates dynamically. So this is what i
can NOT use : [URL]
The question is can I use something like this instead of using objects?
[Code]....
The purpose is to use Join method of ObjectQuery with syntax as in Where method :[URL]
View 2 Replies
Nov 4, 2010
How do I upgrade an existing VS2010 ASP.Net 3.5 project from Entity Framework 3.5 to Entity Framework 4.0?
Do I:
- Change the references?
- Change the target framework?
View 2 Replies
Sep 9, 2010
I am new to this, and I am trying to implement a linq query similar to db.Genres.Include("Albums") command from
mvc music store using my current DB setup. I realize that the tutorial mentions Checlking the "Include foreign key columns in the method" when creating the tables in ADO.NET, but if I am using LINQ to SQL classes, then how can I obtain the same effect. And how do I use
db.Genres.Include("Albums") to simplify my life?
View 2 Replies
Jan 6, 2011
I have a stored procedure that receives 2 parameters and returns 3 columns.
Here is how I added the SP:
1. Added SP to entity model (.edmx) via update model from DB.
2. Did a Function Import -- selected my SP, clicked "Get Column Information" and then created a new complex type (myStoredProcedureName_Result) which I assigned.
3. My LINQ is the following:
[Code]....
View 3 Replies
Sep 1, 2010
I'm working with Visual Studio 2010 and for Data Connections am connecting to a SQL Server 2000 production database. When I try to drag a table to a .dbml file, the Object Relational Designer says, "The selected object(s) use an unsupported data provider." If I try to create an .edmx file via Generate from database, then the alert is, "This server version is not supported. You must have Microsoft SQL Server 2005 or later."
So VS 2010 has no support for the Data Entity Framework or LINQ when connecting to a SQL Server 2000 database? If that is the case, what is the best data access strategy for this scenario?
View 4 Replies
Oct 25, 2010
Is there a way to export a EF 4.0 Data Model to EF 3.5?
I looked around and found that we are not able to access EF 4.0 from a ASP.Net 3.5 project here: [URL]
Our project is the 1st to go to .Net 4.0 using Entity Framework and we (the team) were wondering if there was a way for the other projects that "might" need to access our data that are still using the .Net 3.5 framework.
View 1 Replies
Nov 2, 2010
I am new to entity framework , it is really very good , but I want to know what is the difference between using entity framework with stored procedure or without stored procedure , which one the faster and what is the benefits for using stored procedures with entity framework.
View 1 Replies
Jun 30, 2010
I have an EDM, it includes the entities extension and history. My goal is to use history to keep track of all the changes made to extension entity. For example, if extension with ID 223 has its property 'Name_Display' changed - I want the history entity to record this.
I'm using ASP.NET with VB.NET. Where in my code do I put the hook to say, "update the history entity" and what should that hook look like?
View 1 Replies
Feb 9, 2011
I get an cast exception when i am trying to insert an entity in Entity Framework (using code-first). From this code :
public virtual T Insert(T entity)
{
return Context.Set<T>().Add(entity);
}
The cast exception is like "impossible to cast ...Collection'1(Entity) to type (Entity)" I can't figure out why. I am pretty sure ive done everything right. Post entity
public class Post
{
public long PostId { get; private set; }
public DateTime date { get; set; }
[Required]
public string Subject { get; set; }
public User User { get; set; }
public Category Category { get; set; }
[Required]
public string Body { get; set; }
public virtual ICollection<Tag> Tags { get; private set; }
public Post()
{
Category = new Category();
if (Tags == null)
Tags = new Collection<Tag>();
}................................
View 9 Replies
Feb 10, 2011
I am mapping a stored procedure to an entity by right clicking on the entity (in the .edmx) and selecting "Stored Procedure Mapping." This brings you to a Mapping Details - "Name of Entity" Window that allows you to select the insert, update, and delete stored procedures associated with the Entity. It also maps the stored procedure parameter to the Entity "Property" (Column).
I'm gettin an error "error 2042: Parameter Mapping specified is not valid." The cause of the error is fairly obvious, in the Insert stored procedure that has been selected, a 'CHAR' parameter is being mapped to an Int32 Entity Property. I altered the stored procedure parameter to match the entity, I deleted the stored procedure, readded, and reslected it as the Insert function. I also cleaned, validated, updated model from database. No matter what I do, the parameter list in the mapping details doesn't reflect the change to the stored procedure. It's stuck on a char --> int32 mapping, even though it has been changed, like it's buried deep in meta data some where.
View 2 Replies
Aug 5, 2010
I am trying to add a new entity and have to refernce associated data to add it. I cannot load the Referencetables. Giving "The EntityReference could not be loaded because it is not attached to an ObjectContext." How do i complete this task in Entity Framework 3.5
[Code]....
View 1 Replies
Mar 31, 2011
I have a stupid problem with the Entity Framework. I get the following Exception:
[Code]....
I have an entity with a 4 fields representing the primary key. I copy it via serialization (works fine). I set the old entity to not valid (Datefield set to a date in the past, this field is part of the PK) and set the copied entity to DateTime.Now.Date. When I call context.AddObject I get the Exception above. I tried copying the entity via reflection but the entity has 3-4 references. And when copied, I get another Exception before even Adding the entity to the context. I also tried setting newObj.EntityKey = null and reset all the fields neccessary for the PK. I just want a whole copy of an entity with a different primary key (and some other fields changed too) and Create it in the database.
View 1 Replies