I'm working on a system that increments has an auto incrementing index used as an identifier. But this gives me a problem as I would like to have the identifiers after doing the insert.
What I have ...

I would like to retrieve the inserted ID after executing this command:
db.Database.ExecuteSqlCommand("INSERT INTO Table_Ressources (IdTypeRessource, IdSociete, IdTypeFormatIntitule_UR)Values (1,1,1);
...

Im actually trying to insert data on my SQL Server database from my C# code, but it doesn't work, when i want to see my data it says no data inserted...
i don't know exactly why i'm new to databases ...

I am asking the C# equivalent of this question. When I insert a row of data that has an auto-increment primary key, how can I then read the primary key back?
I need this for SQlite (this answers for ...

My problem might be a bit long to describe as the project we are working on is a bit bigger, but i will try to be as precise as i can.
Basically we're developing a web-bases woundmanagement (part of ...

My app shows a menu of a restaurant where, after logging in with an email and password from the database, the client guides you to a computer that calculates Kcal after certain dates. I would like to ...

I have created a daily sales recording system for a grocery shop where until 1000 records it works perfectly. After 1000th record its not auto-incrementing but I can manually change the primary key ...

I am using the answer of this question How to automatically generate unique id in sql server to create a custom id for a table.It worked perfectly.Now I have a column which holds the values such as ...