none
Entity framework with stored prcedure RRS feed

  • Question

  • Hi,

    Since Entity frame work  is   all  about ORM Api, which removes the headach  of  writing the classes ,properties   of entities and mapes the entity with Db objects.  and provide the queriable and navigational object which redues the  time and efford  of writing the propert(entity)bussiness and DAL layer

    whole focus come on dealing with queriable objects

    Question : if i use the stored prcedure  in entity framework will it give me the same benefit. or with the use of stored proc i m  just getting the automated enity classes (POCO).thats all.no more benfit.

    or using stored procedure along with entity framework  is as benfical as  with queriable object.

    can  anybody help me on this.

    Thanks in advance 

    Monika Singh

     


    Saturday, May 10, 2014 6:02 PM

Answers

  • The only thing a sproc can buy you is from a security aspect, because the DBA can set what user credentials or user groups can execute the sproc. So an organization can use sprocs in that manner with EF for finite security reasons.

    When EF submits generated T-SQL, it uses the SQL Server System sproc to excute the T-SQL with all the benefits of a sproc being used by a developer or DBA such as caching, etc etc when the sproc is used in code.

    No mater what,  objects must be materialized and data mapped to objects on queries if using your own sproc with EF,  or EF is using its internal mechanisms.  

    Sunday, May 11, 2014 6:10 AM