You could do that way (console app example): // BookRepository public static void GetBooks() { using var connection = new MySqlConnection("yourConnectionString"); var getBooksQuery = connection.Query("sp_select_all_books", commandType: CommandType.StoredProcedure); foreach (var book in getBooksQuery) { Console.WriteLine($"Book Author: {book.Author} Book Title: {book.Title}\Book Description: {book.Description} "); } }
@@TechWithPat hi bro.. Can u create a video for how to login sql server and create admin, password, to create sql database and where we can find the data source of those database
Prefere Dapper than EF, the freedom with Dapper 👌 😎
Excellent work! Very clear and easy to understand.
Thank you for share this tutorial.
Very Nice ! what about stored procedures ?
Very nicely explained thanks. Can you please post a video using dapper contrib which does not need us to write a sql
thnx
Superb, please upload with blazor + dapper example.
Wonderful!
How you can use store procedure with dapper??
You could do that way (console app example):
// BookRepository
public static void GetBooks()
{
using var connection = new MySqlConnection("yourConnectionString");
var getBooksQuery = connection.Query("sp_select_all_books", commandType: CommandType.StoredProcedure);
foreach (var book in getBooksQuery)
{
Console.WriteLine($"Book Author: {book.Author}
Book Title: {book.Title}\Book Description: {book.Description}
");
}
}
Sql server developer or express.. Which i have to use. Bro
You can use both, Express is free though.
@@TechWithPat hi bro.. Can u create a video for how to login sql server and create admin, password, to create sql database and where we can find the data source of those database