none
Is EntityFrameowrk using linqtosql under neath? RRS feed

  • Question

  • Hi There,

    I am quite new to entity frame work 4.0 and what I know from my intial analysis is entity framework is nothing but an abstraction of ado.net with its storage model,conceptual schema and the mappping between these two.But one thing I am unclear is while fetching data from data base or executing any stored procedure what mechanism its following.

    Is it adopting the traditional ado.net approach or is it the concept of linq2sql?

    The reason I am asking this question is in our project we are not suppose to use linq for some security reason(i am not sure what this security linkage is but we have not to follow linq relegiously).

    So I just wanted to know how entityframework works for performing all its db transaction and whether by any chance it is using linq to sql?

    Hope I was able to convey my problem.Please look into this and respond asap.I am in a kind of fix :(

    Regards

    Subrat

    Wednesday, June 15, 2011 3:38 AM

Answers

  • Hi,

    EF does not use LinqToSql underneath, it uses ADO.NET as communication to with the DBMS. EF is database independent while LinqToSql isn't.

    As for security reason, I can't really figure out what that could be, but I think this is a bit out of scope.

    Hope this answers your question!


    --Rune
    Wednesday, June 15, 2011 5:31 AM
  • On 6/14/2011 11:38 PM, Subrat4.net wrote:
    > Hi There,
    >
    > I am quite new to entity frame work 4.0 and what I know from my intial
    > analysis is entity framework is nothing but an abstraction of ado.net
    > with its storage model,conceptual schema and the mappping between these
    > two.But one thing I am unclear is while fetching data from data base or
    > executing any stored procedure what mechanism its following.
    >
    > Is it adopting the traditional ado.net approach or is it the concept of
    > linq2sql?
     
    It's the concept of an Object Relational Mapping application, which can
    work with other databases other than SQL Server, like Oracle, MySQL and
    a few others using an ORM like nHibernate or EF.
     
    What is an ORM?
     
     
    >
    > The reason I am asking this question is in our project we are not
    > suppose to use linq for some security reason(i am not sure what this
    > security linkage is but we have not to follow linq relegiously).
     
    I suspect that whoever is making this decision about Linq doesn't know
    what Linq is about.
     
    Do you know what Linq is about?
     
     
    Basically, Linq is a query language. Linq must encapsulate everything as
    'objects' and returns the results in a tubular form. That's what Linq
    does. It's a query language.
     
    >
    > So I just wanted to know how entityframework works for performing all
    > its db transaction and whether by any chance it is using linq to sql?
     
    EF uses Linq-2-Entites and it uses an SQL Server internal stored
    procedure to sumbit T-SQL to be executed.
     
     
    >
    > Hope I was able to convey my problem.Please look into this and respond
    > asap.I am in a kind of fix :(
    >
     
    I have used EF in the Data Access Layer of N-tiered Web applications
    like WCF Web services on the backend, which is no more dangerious than
    using ADO.NET and SQL Command Objects with sprocs on the backend..
     
    But I also use DTO(s) Data Transfer Objects an abstraction above EF for
    EF and Web based solutions.
     Secuirty...
     Now, if I am using EF in a back-end batch solution that's sitting on a
    machine behind a corporate firewall where is the threat?
     
    Wednesday, June 15, 2011 5:44 AM

All replies

  • Hi,

    EF does not use LinqToSql underneath, it uses ADO.NET as communication to with the DBMS. EF is database independent while LinqToSql isn't.

    As for security reason, I can't really figure out what that could be, but I think this is a bit out of scope.

    Hope this answers your question!


    --Rune
    Wednesday, June 15, 2011 5:31 AM
  • On 6/14/2011 11:38 PM, Subrat4.net wrote:
    > Hi There,
    >
    > I am quite new to entity frame work 4.0 and what I know from my intial
    > analysis is entity framework is nothing but an abstraction of ado.net
    > with its storage model,conceptual schema and the mappping between these
    > two.But one thing I am unclear is while fetching data from data base or
    > executing any stored procedure what mechanism its following.
    >
    > Is it adopting the traditional ado.net approach or is it the concept of
    > linq2sql?
     
    It's the concept of an Object Relational Mapping application, which can
    work with other databases other than SQL Server, like Oracle, MySQL and
    a few others using an ORM like nHibernate or EF.
     
    What is an ORM?
     
     
    >
    > The reason I am asking this question is in our project we are not
    > suppose to use linq for some security reason(i am not sure what this
    > security linkage is but we have not to follow linq relegiously).
     
    I suspect that whoever is making this decision about Linq doesn't know
    what Linq is about.
     
    Do you know what Linq is about?
     
     
    Basically, Linq is a query language. Linq must encapsulate everything as
    'objects' and returns the results in a tubular form. That's what Linq
    does. It's a query language.
     
    >
    > So I just wanted to know how entityframework works for performing all
    > its db transaction and whether by any chance it is using linq to sql?
     
    EF uses Linq-2-Entites and it uses an SQL Server internal stored
    procedure to sumbit T-SQL to be executed.
     
     
    >
    > Hope I was able to convey my problem.Please look into this and respond
    > asap.I am in a kind of fix :(
    >
     
    I have used EF in the Data Access Layer of N-tiered Web applications
    like WCF Web services on the backend, which is no more dangerious than
    using ADO.NET and SQL Command Objects with sprocs on the backend..
     
    But I also use DTO(s) Data Transfer Objects an abstraction above EF for
    EF and Web based solutions.
     Secuirty...
     Now, if I am using EF in a back-end batch solution that's sitting on a
    machine behind a corporate firewall where is the threat?
     
    Wednesday, June 15, 2011 5:44 AM