Это видео недоступно.
Сожалеем об этом.

Dot NET Core Web API using VS Code (Entity Framework DB First + CRUD Actions + Testing with Swagger)

Поделиться
HTML-код
  • Опубликовано: 15 июн 2022
  • #dotnetcore #webapi #entityframeworkcore #vscode #nihiratechiees
    This video explains how to create Dot NET Core Web API using VS Code
    Source Code
    ===========
    github.com/nih...
    Steps followed
    ============
    1, First We need to Install .NET Core SDK Latest
    2, Create Web API Using below command
    dotnet new webapi
    3, Run the application
    dotnet run
    4, Install the below extension
    1, C#
    2, Nuget Package manager
    5, Install Entity Framework
    dotnet tool install --global dotnet-ef
    6, Add package Entity Framework Design
    dotnet add package Microsoft.EntityFrameworkCore.Design
    7, Execute the below command form verify the EF Installation
    dotnet ef
    8, Enter scaffold command
    dotnet ef dbcontext scaffold "connectionstring" Microsoft.EntityFrameworkCore.SqlServer --output-dir Models
    9, For Generating bd context only in the folder
    dotnet ef dbcontext scaffold --context-dir Models
    10, Create the controller also complete the steps in the middleware

Комментарии • 59

  • @nirmalmeenu2277
    @nirmalmeenu2277 2 месяца назад +1

    but when i give command like 'dotnet new webapi' it doesn't create controller folder and files automatically
    ..... give me a solution

  • @natalif796
    @natalif796 Год назад

    I started to create my own web api using your videos. Helps a lot. Thank you for your work🙏🧡

  • @SYinfo
    @SYinfo Год назад +1

    This is excellent. Thank you.

  • @Fred_Edx
    @Fred_Edx 8 месяцев назад

    Great lecture.

  • @VijayKumar-fq4ie
    @VijayKumar-fq4ie 2 года назад

    Waiting for it from 2 hours. pls make a complete series on it.

  • @joshuagalit6936
    @joshuagalit6936 7 месяцев назад

    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SNI_PN11, error: 26 - Error Locating Server/Instance Specified)

    • @NihiraTechiees
      @NihiraTechiees  6 месяцев назад

      Look like configuration issue in your database

  • @ran_css
    @ran_css 3 месяца назад

    Hello sir thank u for explain this on vscode i want ask u if u r explain controller and servics or not?

    • @NihiraTechiees
      @NihiraTechiees  3 месяца назад +1

      Follow this playlist it covered all

  • @vimleshsharma3251
    @vimleshsharma3251 Год назад

    Thank you so much👍

  • @naimishahada1414
    @naimishahada1414 Год назад

    Just after executing Dotnet run command
    Localhost is not loading.
    Also swagger is not loading. Follows ur steps. Pls let me know if anything need to be corrected. Also I haven't changed anything 😀after creating project. Still.

  • @kuldeeprajpurohit558
    @kuldeeprajpurohit558 Год назад +1

    Why model folder is not created while connecting to server database

  • @alekhyanaidu3365
    @alekhyanaidu3365 3 месяца назад

    i have followed just as u mentioned but when i run the command dotnet new webapi, then i am not getting controllers folder and weatherforecast.cs model
    what do i do all the others were being created

    • @NihiraTechiees
      @NihiraTechiees  3 месяца назад

      I believe you chosen wrong template. Follow the steps and try again

    • @njlei4412
      @njlei4412 3 месяца назад +1

      the new version won't create controllers. you have to add option. something like: dotnet new webapi --use-controllers -n myApiname

  • @codebrilliantly
    @codebrilliantly 5 месяцев назад

    When I run this command:
    dotnet ef dbcontext scaffold "Server=localhost;Database=Learn_Db;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer --output-dir Models
    I get the following:
    A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught)
    Any help?

  • @twyyre5385
    @twyyre5385 Год назад

    how to create an edit function that edits table columns. You only create, delete, and retrieve columns.

    • @NihiraTechiees
      @NihiraTechiees  Год назад

      Watch the full video create and edit also added

  • @VenkatVenkat-kx8lw
    @VenkatVenkat-kx8lw 8 месяцев назад

    Hi Sir,
    How can rebuild models, if any new table has been created in database.

    • @NihiraTechiees
      @NihiraTechiees  7 месяцев назад

      Need to execute scaffold command it will generate the new model for newly created table

  • @mathewsgolias4732
    @mathewsgolias4732 Год назад

    Does anyone have this error? "Failed to create CoreCLR, HRESULT: 0x80004005"

    • @NihiraTechiees
      @NihiraTechiees  Год назад

      Look like dot net SDK not properly installed. Could you reinstall and try

  • @gokulv1907
    @gokulv1907 11 месяцев назад

    Are you using *stored procedure* for CRUD in this app ? Please reply asap.

    • @NihiraTechiees
      @NihiraTechiees  11 месяцев назад +1

      No. Directly dealing with table

    • @gokulv1907
      @gokulv1907 11 месяцев назад

      Thanks for the video and reply❤️. If possible make video for *MVC web app with simple crud operations & stored procedure using vs code*.

  • @shanmugabavanshan9497
    @shanmugabavanshan9497 Год назад

    Where can I get this slide.... It will be easy to copy the Commands from there

    • @NihiraTechiees
      @NihiraTechiees  Год назад

      I am not maintaining slides, mostly I added all required information in the description. If any additional details needed please let me know

  • @AbdulWareezSheriffdeen
    @AbdulWareezSheriffdeen Год назад

    please sir is it the scaffold command that generated those class in Models

    • @NihiraTechiees
      @NihiraTechiees  Год назад

      Yes. DB first approach scaffold will generate model class.
      In code first approach we have to create model class first

  • @poojaswain4722
    @poojaswain4722 Год назад +1

    can you provide database part sir

    • @NihiraTechiees
      @NihiraTechiees  Год назад

      github.com/nihira2020/Database/blob/main/Learn_DB_script.sql

  • @sonalidatey4084
    @sonalidatey4084 Год назад

    How to create api with code first approach then?

    • @NihiraTechiees
      @NihiraTechiees  Год назад

      Check this link ruclips.net/video/K6VVCxhFVgY/видео.html

  • @ahsanali580
    @ahsanali580 Год назад

    how to generate connection string ?

    • @NihiraTechiees
      @NihiraTechiees  Год назад

      It's just declaration combination of servername credentials

    • @bulatruslanovich422
      @bulatruslanovich422 11 месяцев назад

      @@NihiraTechiees , how do I get them? (I have linux)

  • @batuhan2553
    @batuhan2553 Год назад

    how do i use the database you use

  • @poojaswain4722
    @poojaswain4722 Год назад

    Sir plz database part provide

  • @user-uc1ow8tp5h
    @user-uc1ow8tp5h Год назад

    please send me database script :(((