Round The Code
Round The Code
  • 123
  • 778 916
Helpful EF Core migration features you might not know about
Looking at some Entity Framework Core migration features that you might not know about.
These changes will make it easier to configure your entities, add an initial set of data, run a SQL script and converting to a particular type when saving a record in the database when applying an EF Core migration.
► Read the article:
www.roundthecode.com/dotnet-blog/ef-core-migration-features-you-might-not-know-about?UklWyvOo+-+video+content+%28tutorial%29
🎓 .NET tutorials, code examples and coding challenges 🎓
www.roundthecode.com/?UklWyvOo+-+video+content+%28roundthecode%2Ecom%29
► Chapters
0:00 Coming up...
0:08 Configure your entities
2:58 Add an initial set of data
4:21 Save data in the DB in a particular type
6:19 Run a SQL command
7:15 Test saving data in a particular type
7:55 More about EF Core
zhlédnutí: 336

Video

Toggle .NET features on & off with ease using feature flags
zhlédnutí 710Před měsícem
Learn how to add ASP.NET Core's feature management package by adding feature flags that can be enabled and disabled. As well as that, you'll learn some of the filters that are included and how you can write your own custom one. And if you use MVC, you'll learn how to use the feature tag helper so you can display content depending on whether a feature flag is enabled or not. ► Read the tutorial:...
SignalR for beginners: Real-time communication in .NET
zhlédnutí 792Před měsícem
Learn how to add SignalR hub to an ASP.NET Core application and add real-time messaging between the client and the server. We'll set up the hub and add it to the ASP.NET Core application. Afterwards, we'll add the connection to the front-end using JavaScript and show you how to send a message to SignalR, receive a message back and output it to the client. 💻 Download the code example💻 www.roundt...
IConfiguration, IOptions or IOptionsSnapshot? Which one?
zhlédnutí 600Před měsícem
When using configuration values in an ASP.NET Core Web API, you can either inject IConfiguration, IOptions, or IOptionsSnapshot into your API controller. We'll inject each one into a controller, test them using an API endpoint to see what they return, and change the configuration values in appsettings.json to see if the change is updated whilst the application is still running. ► Read the tutor...
What's it like using VS Code to build a .NET project?
zhlédnutí 1,4KPřed měsícem
We've dropped Visual Studio and developed a .NET project using Visual Studio Code. How easy it is to use? After downloading VS Code and the .NET SDK, we'll add the extensions that will help you to develop a .NET application. We'll create an ASP.NET Core Web API, develop some services and some controllers. Afterwards we'll build and run the application. As well as that, we'll look at how we can ...
Add geolocation to .NET: Find your client's location easily
zhlédnutí 653Před 2 měsíci
Learn how to add geolocation for free to your .NET project by doing an IPv4 address lookup so you know the country as to where each of your clients are located. We'll show you how to add it for each of your client's IP address and how you can get the IP address if you are using a reverse proxy like Cloudflare. As well as that, we'll also show you how you can get city information from your clien...
Add Stripe to your .NET project in less than 10 minutes!
zhlédnutí 416Před 2 měsíci
Learn how to add Stripe to your ASP.NET Core project to take online payments. This checkout example will use the Stripe.net NuGet package so you can easily integrate it into your .NET project. We'll code the Stripe solution in an ASP.NET Core Web API endpoint and show how you how to redirect a user to Stripe. We'll also look at how to set up a Stripe account and get an API key. 💻 Download the c...
Do try, catch and finally code blocks always run in C#?
zhlédnutí 241Před 2 měsíci
We'll have a look at how to write try and catch statements, how to add multiple catch statements and how to write custom exceptions. Afterwards, we'll go through a number of different scenarios to see whether the catch and finally code blocks run in an ASP.NET Core Web API and a Console application. ► Read the tutorial: www.roundthecode.com/dotnet-tutorials/when-does-try-catch-finally-code-bloc...
C# changes you may not know about to help write cleaner code
zhlédnutí 656Před 2 měsíci
We'll have a look at some of the C# features that have been released in new major versions of .NET. These changes will help you write cleaner code that is more readable. We'll have a look at how to reduce the number of lines when using switch, and how you can pass parameters into a class. ► Read the article: www.roundthecode.com/dotnet-blog/write-cleaner-code-csharp-changes-you-may-not-know?C-X...
Why you must use async/await in C# to make API calls
zhlédnutí 1,2KPřed 3 měsíci
Learn why you must use async and await to make HTTP requests to API's. You'll learn the difference between synchronous and asynchronous, how to write an async C# method and some of the other Task methods that you can await, such as Task.WhenAll, Task.WhenAny and Task.Run. ► Read the tutorial: www.roundthecode.com/dotnet-tutorials/how-to-use-csharp-async-await-api-calls-stop-blocking?Sl3610zDC-M...
.NET 7 apps must be updated now to stop vulnerabilities
zhlédnutí 1,3KPřed 3 měsíci
.NET 7 has reached End of Life (or EOL). By continuing to use it, you're putting your app at risk of known bugs and security vulnerabilities. Learn how to update your ASP.NET Core application to the latest .NET version to reduce the risk on your application, data and computing environment. You can also take advantage of any new features it has to offer. ► Read the article: www.roundthecode.com/...
Use HttpClient the correct way to avoid socket exceptions
zhlédnutí 1KPřed 3 měsíci
We'll show you the best practices to make a GET request using HttpClient in an ASP.NET Core app using IHttpClientFactory. We'll also show you some of the other ways that are not recommended. Finally, we'll bind a JSON response to an object that we can use as part of an API response. ► Read the tutorial: www.roundthecode.com/dotnet-tutorials/how-to-use-httpclient-correctly-avoid-socket-exception...
8 C# technical questions you need to know for an interview
zhlédnutí 1,3KPřed 4 měsíci
We'll go through C# technical interview questions that will help you prep for a job interview and how to answer them. These coding questions are entry level questions that all C# developers should know the answer to. As well as that, we'll look at some of the other technical tests you might get, and what happens should you be lucky to get an offer. ► Read the article: www.roundthecode.com/dotne...
Are you prepared for your next .NET interview?
zhlédnutí 586Před 4 měsíci
Prepare for your next .NET and C# interview with our essential advice. We'll go through some interview questions that you might get asked and how to best answer them. As well as that, we'll guide you through the process of applying for a job and show you how to handle salary expectations and your work environment. The pandemic has allowed more and more people to work from home, but the job adve...
Your .NET resume needs to stand out to land your next job!
zhlédnutí 2,8KPřed 4 měsíci
Are you struggling to get your next job as a .NET and C# developer? It may be your resume that is holding you back. The emergence of artificial intelligence (AI) in the last 18 months has meant that tech industry companies have made a record number of layoffs and redundancies for software and web developers. Therefore, it's critical that your resume stands out from the crowd. This video will pr...
How to use Moq to mock xUnit tests for a .NET project
zhlédnutí 916Před 4 měsíci
How to use Moq to mock xUnit tests for a .NET project
xUnit tutorial: How to run unit testing in C#
zhlédnutí 793Před 5 měsíci
xUnit tutorial: How to run unit testing in C#
Create ASP.NET Core Web API CRUD methods (& test in Postman)
zhlédnutí 1,3KPřed 5 měsíci
Create ASP.NET Core Web API CRUD methods (& test in Postman)
How to create an ASP.NET Core Web API project in .NET 8
zhlédnutí 1,7KPřed 5 měsíci
How to create an ASP.NET Core Web API project in .NET 8
How to write custom middleware in ASP.NET Core
zhlédnutí 339Před 6 měsíci
How to write custom middleware in ASP.NET Core
Raw SQL queries & stored procedures in Entity Framework Core
zhlédnutí 3,8KPřed 6 měsíci
Raw SQL queries & stored procedures in Entity Framework Core
Include method for one to many relationships in EF Core
zhlédnutí 1,2KPřed 6 měsíci
Include method for one to many relationships in EF Core
Select rows using queries in Entity Framework Core
zhlédnutí 572Před 6 měsíci
Select rows using queries in Entity Framework Core
Insert, update & delete a record in Entity Framework Core
zhlédnutí 1,6KPřed 7 měsíci
Insert, update & delete a record in Entity Framework Core
Entity Framework Core migrations: Add a migration
zhlédnutí 5KPřed 7 měsíci
Entity Framework Core migrations: Add a migration
Create a DbContext class in Entity Framework Core
zhlédnutí 4,7KPřed 7 měsíci
Create a DbContext class in Entity Framework Core
No more custom middleware for global exception handling
zhlédnutí 1,8KPřed 7 měsíci
No more custom middleware for global exception handling
How .NET has evolved with features from previous versions
zhlédnutí 234Před 7 měsíci
How .NET has evolved with features from previous versions
How C# has evolved with features from previous versions
zhlédnutí 576Před 8 měsíci
How C# has evolved with features from previous versions
Why does LINQ have so many ways to return an element?
zhlédnutí 507Před 8 měsíci
Why does LINQ have so many ways to return an element?

Komentáře

  • @foudilbenouci482
    @foudilbenouci482 Před 8 dny

    Hi, I don t see where in your code the log method is called ?

  • @TheDrComedy
    @TheDrComedy Před 8 dny

    What is the real benefit of using an error handler compared to a exception middleware?

  • @wawingiantonio8138
    @wawingiantonio8138 Před 9 dny

    why having Produtct and GetProduct??

  • @shahnawazk
    @shahnawazk Před 12 dny

    Great informative video, keep it up!

  • @hauhoanghai8454
    @hauhoanghai8454 Před 12 dny

    thank you sir

  • @henryespinozat
    @henryespinozat Před 15 dny

    Question: when we use [fromquery] but i need to recive more than one parameters, do a have to create a class? or in a method i can declare [fromquery] many time?

  • @kangourou702
    @kangourou702 Před 15 dny

    Nice and useful. Thanks.

  • @JanManipol
    @JanManipol Před 15 dny

    Thanks for the help. You're a savior.

  • @Tymonello
    @Tymonello Před 17 dny

    Great quick explanation!

  • @mhsn27mhsn10
    @mhsn27mhsn10 Před 18 dny

    thank you Sir

  • @mehmetince2630
    @mehmetince2630 Před 19 dny

    Very nice video. very instructive content. Thanks

  • @sivas4861
    @sivas4861 Před 24 dny

    Doubt please , Did we use same YAML file tasks for .NET and .NET Core , Is they are same or different .

    • @RoundTheCode
      @RoundTheCode Před 19 dny

      You can't use the DotNetCoreCLI@2 for .NET Framework tasks. That's specific to .NET Core. I think you can use VSBuild@1 for .NET Framework tasks.

  • @akshorts4862
    @akshorts4862 Před 27 dny

    very well explained, I have little issue with pronunciation and accent as I am from different country, but very nice information, sir !!

  • @JCode00
    @JCode00 Před 28 dny

    I love your channel, I'm living in Portugal, but I'm looking for new jobs in 🇬🇧.

    • @RoundTheCode
      @RoundTheCode Před 19 dny

      Best bet will be to relocate to the UK. You'll have a better chance of getting a job.

  • @TerrenceFerguson
    @TerrenceFerguson Před 29 dny

    I would like to echo the following comment: "I cannot explain enough how this video is infinitely better than all of the Microsoft documentation combined." It's a year later, and this is still true. Thank you for the work on this video.

  • @parthibanparthi3029
    @parthibanparthi3029 Před měsícem

    Thanks very much for this video

  • @parthibanparthi3029
    @parthibanparthi3029 Před měsícem

    How to create build Pipeline .yml

  • @riccarrasquilla379
    @riccarrasquilla379 Před měsícem

    thanks for the video

  • @cissemy
    @cissemy Před měsícem

    Great . How to send a message to a specific user ?

  • @madhudharani9020
    @madhudharani9020 Před měsícem

    well explained

  • @out-of-sight
    @out-of-sight Před měsícem

    Thanks for the video. 🤩

  • @HeshamZeid
    @HeshamZeid Před měsícem

    Thanks

  • @vishnugandham3141
    @vishnugandham3141 Před měsícem

    God bless you

  • @Thez-nl7gn
    @Thez-nl7gn Před měsícem

    You sir, are brilliant! Thank you

  • @10Totti
    @10Totti Před měsícem

    Great tutorial, but missing IOptionsMonitor.

  • @petercortens6019
    @petercortens6019 Před měsícem

    Nope. Maybe it is helpful in better templating, or helping juniors in setting up schoolbook application skeletons but it is beyond clueless in finding bugs, optimizing logic or generating custom algorithms. We already have non-LLM generative tools since decades, which are precise and helpful, but you only use them for specific application layers like entities or persistence. 101 in optimizing & debugging : comprehend your code. 101 in having more capabilities: clients want more and richer features

  • @dfcw
    @dfcw Před měsícem

    Thanks David, fantastic video. One of our front-end developers who uses Linux and Vscode is looking into moving into some backend stuff - do you have any hint for using custom nuget feeds (authenticating from Azure artifacts) and using Default Azure credentials on Linux for Azure Key Vault? Thanks

  • @sheriffcrandy
    @sheriffcrandy Před měsícem

    Why don't you use releases?

    • @RoundTheCode
      @RoundTheCode Před měsícem

      Releases is the old way of doing it.

    • @sheriffcrandy
      @sheriffcrandy Před měsícem

      @@RoundTheCode Maybe for small-scale projects. But for an Azure DevOps implementation housing 50+ large scale enterprise repos, I think standard release pipelines are the way to go. Did microsoft come out with any docs/statements recommending to use only pipelines, not releases anymore?

  • @thfsilvab
    @thfsilvab Před měsícem

    I gave C# on VS Code a real try at a big work project, 8 months using this tool stack, it's extremely far from ready for any usage. The LSP is slow, eats up a lot of resources (both RAM and CPU), full of bugs, and needs to be restarted from time to time because it decides to stop working randomly, therefore, taking full minutes to reload the projects again.

  • @mrjson3039
    @mrjson3039 Před měsícem

    I'm sorry I ever considered this ecosystem to find a job. As for you mr Round the code thaNks for the amazing video!! The tool failed me, not your content.

  • @curtmantle7486
    @curtmantle7486 Před měsícem

    .NET Developers who don't use Rider are at a disadvantage.

    • @RoundTheCode
      @RoundTheCode Před měsícem

      Never used it personally, so I can't comment. But I have heard good things about it.

  • @ShinSpiegel
    @ShinSpiegel Před měsícem

    Step 1: install Linux Step 2: Install NeoVim Step 3: Code like a real man

    • @RoundTheCode
      @RoundTheCode Před měsícem

      Can't say I've used NeoVim. What's it like?

    • @ShinSpiegel
      @ShinSpiegel Před měsícem

      It's a bare-bones text editor. It's efficient in its core, use a set of movement called “VIM motions” that are (very often) useful for manipulating text (and code). Uses a language to manipulate itself (instead of JSON), so you can change and modify the editor to suit your needs.

    • @ShinSpiegel
      @ShinSpiegel Před měsícem

      Aaahhh almost forgot, when youststt using neovim you can say “I use VIM btw” 😊

  • @EngineerNick
    @EngineerNick Před měsícem

    Thankyou for this. I had a very bad time with using C# from the command line/VS Code when I had to use C# for a similar web service thing. The Visual Studio IDE has infected the C# / dotnet languages with a method of working that is very UI based. I am simultaneously impressed and disgusted that a CLI would be used to create a class. I would never have thought to try that. Obviously productivity benefits... but oh man too bad if you dont like Microsofts way of doing things i guess.

    • @mrjson3039
      @mrjson3039 Před měsícem

      The same thing stood out to me. It never would've occurred to me to use a cli tool to create a class. I guess Microsoft wants to beat sun microsystems at creating the most convoluted boiler plate machined ever to boilerplate 😂

    • @RoundTheCode
      @RoundTheCode Před měsícem

      You can use the application to create a class etc. using Solution Explorer in VS Code if that's your preferred choice. Here's a video with more detail on it: czcams.com/video/r4WrDfuDT24/video.html

  • @mmaranta785
    @mmaranta785 Před 2 měsíci

    Will this work with net framework 4.0?

    • @RoundTheCode
      @RoundTheCode Před měsícem

      Yes, but you have to install the Microsoft.Bcl.Async NuGet package.

  • @purplepanther4153
    @purplepanther4153 Před 2 měsíci

    Nlog does a good job. and easy.

  • @purplepanther4153
    @purplepanther4153 Před 2 měsíci

    Aspnet .core logging suck no offense. its not straight forward when u want to log a file.

  • @nicezii694
    @nicezii694 Před 2 měsíci

    With this method When I’m execute my API with postman I have to set header to Authorization Basic base64username&password Right?

    • @RoundTheCode
      @RoundTheCode Před 2 měsíci

      You need to base 64 encode it in this format. {username}:{password} So you should be passing in a base64 hash as part of the Authorization header.

  • @devgenesis6436
    @devgenesis6436 Před 2 měsíci

    how can we find device details, like parsing from user agent .. i want to implement the new device-found functionality like google offers and send MFA on the app...

    • @RoundTheCode
      @RoundTheCode Před 2 měsíci

      I'm not sure, but I might look into it.

  • @skemuel
    @skemuel Před 2 měsíci

    Awesome. Thanks for this

  • @9t4j
    @9t4j Před 2 měsíci

    awesome tips :D

  • @cissemy
    @cissemy Před 2 měsíci

    Thanks Can you pass the price as querystring parameter ?

    • @RoundTheCode
      @RoundTheCode Před 2 měsíci

      No, because you would be able to change the price.

  • @stilllearningknowledge4529
    @stilllearningknowledge4529 Před 2 měsíci

    Thank you. Clear and simple. Nice explanation. Keep going

  • @gahshunker
    @gahshunker Před 2 měsíci

    how can this made cross platform? any nuget package to have a host that is not windows specific? great video btw, concise and to the point. thanks

  • @Abishkar-q1p
    @Abishkar-q1p Před 2 měsíci

    good video gave good insight on how the code works for newbies

  • @DickBakerSql
    @DickBakerSql Před 2 měsíci

    offset=2:50 as shown the category input parameter should be of type Category (i.e. that SHOULD not be null) public string? GetCategoryName(Category category) alternatively you could explicitly specify method declaration to accept nullable params with one of public string? GetCategoryName(Category? category) public string? GetCategoryName([AllowNull] Category category) so compiler would alert dodgy statements e.g. category.Name would be squiggled to warn dev to reconsider, e.g. Severity Code Description .. Warning CS8602 Dereference of a possibly null reference. Certainly your code _could_ have an early guard statement as safety-check (despite declaring "Category" as non NULLable), but I find that inconsistency to be a code-smell and I prefer using proper NRT semantics. Current project templates now include <Nullable>enable</Nullable> in generated .csproj to discourage NULL accidents.

  • @DickBakerSql
    @DickBakerSql Před 2 měsíci

    offset=2:21 for "can not allocated .." read "can not allocate .."

  • @LiquidreamUK
    @LiquidreamUK Před 2 měsíci

    Lots of great tips here that I missed in recent .NET/C# updates. Thanks!

  • @temp_sach
    @temp_sach Před 2 měsíci

    awesome video ! use this for reference at work