I have a table named (BookNames) in an SQL Database with just one field named BookTitle which stores strings.
I need help writing a C# Function using LINQ which takes a string parameter and returns the ID of a record from that table that matches the string passed as a paremeter to this function.
I am using EntityFramework in my application and have a DBContext name BooksDBContext in my application.
So if my table with its data looks like as below:
1 War and Peace
2 A Farewell to Arms
And I pass a string (bookTitle "A Farewell to Arms") to the following function:
int MyFuntionToGetID (string bookTitle)
BooksDBContext context = new BooksDBContext();
This function should return me 2 which is the ID of the second record in this table.
Why is this different from all of the other step by step guides? Because I make a living as a DBA and not as a writer and I lived through this experience.
Defining the name:
When I talk to people they say different names on this subject stuff l…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.