none
Direct access to database RRS feed

  • Question

  • Hi everybody!

    I have used entity framework as data access technology in my application, but in some specific situation I need to have direct access to database. 

    For example I simulate a special autonumber feature for one of my tables based on a specific year and before inserting or updating a record in that table, I need to get the last number from another table in the database. after using the value, it should be increased by 1 for the next value, and all of this process must be performed in a transaction.

    At first I used stored procedures and performed all the above actions in them and map the related insert, update and delete sps to the table, but it didn't work because it required some extra parameters that didn't map to table's fields.

    Does anybody know the solution?

    I would appreciate it in advance.

    Roozbeh

    Saturday, November 5, 2011 10:44 AM

Answers

All replies