Use DbContextPooling to Improve the Performance : .NET Core 2.1 Feature π
If you are familiar with .NET Core, then you might be knowing AddDbContext method. π§
This method is used to inject dependency of DbContext into your controller and it should be written in the Startup.cs class. π
So in case of AddDbContext, a new instance will be created for each request and would get disposed once the work is done. β»οΈ
New contexts are getting created for each request. β³
That is still fine but if there are more than 1k requests β 1k times object will be created and disposed, unless you have made it a Singleton. βπ»
Creating and disposing of so many objects may impact the performance. β
How DbContextPooling can helpβ
https://t.me/pgimg/117
[ Article ] : http://bit.do/dbpol
γ°γ°γ°γ°γ°γ°
#AspMvc #Core
@ProgrammingTip
If you are familiar with .NET Core, then you might be knowing AddDbContext method. π§
This method is used to inject dependency of DbContext into your controller and it should be written in the Startup.cs class. π
So in case of AddDbContext, a new instance will be created for each request and would get disposed once the work is done. β»οΈ
New contexts are getting created for each request. β³
That is still fine but if there are more than 1k requests β 1k times object will be created and disposed, unless you have made it a Singleton. βπ»
Creating and disposing of so many objects may impact the performance. β
How DbContextPooling can helpβ
https://t.me/pgimg/117
[ Article ] : http://bit.do/dbpol
γ°γ°γ°γ°γ°γ°
#AspMvc #Core
@ProgrammingTip
Telegram
Programming Tips Resources
Using MariaDB with ASP.NET Core 2.0 π
What is MariaDBβ
MariaDB is a community-developed fork of the MySQL relational database management system intended to remain free under the GNU GPL. π§
Development is led by some of the original developers of MySQL, who forked it due to concerns over its acquisition by Oracle Corporation. π
Basically it is a fork of MySQL which is guaranteed to stay open source, and as noted it is supposed to be a drop-in replacement for MySQL. β¨
So letβs put this to the test with a simple ASP.NET Core application. π₯
https://t.me/pgimg/118
[ Article ] : bit.do/mariad
γ°γ°γ°γ°γ°γ°
#AspMvc #Core #MariaDB #MySql
@ProgrammingTip
What is MariaDBβ
MariaDB is a community-developed fork of the MySQL relational database management system intended to remain free under the GNU GPL. π§
Development is led by some of the original developers of MySQL, who forked it due to concerns over its acquisition by Oracle Corporation. π
Basically it is a fork of MySQL which is guaranteed to stay open source, and as noted it is supposed to be a drop-in replacement for MySQL. β¨
So letβs put this to the test with a simple ASP.NET Core application. π₯
https://t.me/pgimg/118
[ Article ] : bit.do/mariad
γ°γ°γ°γ°γ°γ°
#AspMvc #Core #MariaDB #MySql
@ProgrammingTip
Telegram
Programming Tips Resources
Blazor π₯
An experimental .NET web framework using C#/Razor and HTML that runs in the browser via WebAssembly that is supported by Microsoft. π
Blazor is a .NET web framework that runs in any browser. π
Blazor uses only the latest web standards. No plugins or transpilation needed. β
It runs in the browser on a real .NET runtime (Mono) implemented in WebAssembly that executes normal .NET assemblies. β‘οΈ
It works in older browsers too by falling back to an asm.js based .NET runtime. π΄πΏ
Blazor will have all the features of a modern web framework, including β¨ :
β’ Components
β’ Routing
β’ Layouts
β’ Forms and validation
β’ Dependency injection
β’ JavaScript interop
β’ Live reloading
β’ Server-side rendering
β’ Full .NET debugging
https://t.me/pgimg/120
[ Github ] : bit.do/blazor
[ Learn ] : learn-blazor.com
[ Flight Finder ] : bit.do/ffinder
[ Sample CRUD ] : bit.do/bzcrud
γ°γ°γ°γ°γ°γ°
#Blazor #AspMvc #Core
@ProgammingTip
An experimental .NET web framework using C#/Razor and HTML that runs in the browser via WebAssembly that is supported by Microsoft. π
Blazor is a .NET web framework that runs in any browser. π
Blazor uses only the latest web standards. No plugins or transpilation needed. β
It runs in the browser on a real .NET runtime (Mono) implemented in WebAssembly that executes normal .NET assemblies. β‘οΈ
It works in older browsers too by falling back to an asm.js based .NET runtime. π΄πΏ
Blazor will have all the features of a modern web framework, including β¨ :
β’ Components
β’ Routing
β’ Layouts
β’ Forms and validation
β’ Dependency injection
β’ JavaScript interop
β’ Live reloading
β’ Server-side rendering
β’ Full .NET debugging
https://t.me/pgimg/120
[ Github ] : bit.do/blazor
[ Learn ] : learn-blazor.com
[ Flight Finder ] : bit.do/ffinder
[ Sample CRUD ] : bit.do/bzcrud
γ°γ°γ°γ°γ°γ°
#Blazor #AspMvc #Core
@ProgammingTip
Telegram
Programming Tips Resources
Programming Tips π‘
Photo
ASP.NET Core.2 & Angular 5.pdf
7.3 MB
API Feature Folders β‘οΈ
In ASP.NET Core (and unlike ASP.NET 5 / Web API 2), Web API controllers are just controllers. π
You donβt need to inherit from a different base type or anything like that. β
Whatβs more, your API controllers should be returning DTOs that are separate from your underlying domain or data model. βοΈ
What Iβve found to be a better organization is to do away with the Controllers folder (or keep it around if youβre using view-based controllers) and instead use feature folders for your APIs. π
Iβm partial to having a root level API folder but if youβd prefer to put your features in the root of the project that would work, too. ππ»
Within each feature folder, you include the controller along with any model types it needs to work with, like this πΎ :
https://t.me/pgimg/124
Obviously one benefit of this approach is that itβs more cohesive. β
Things that change together are located physically next to one another, and the friction involved in moving between different folders with too many files in them is greatly reduced. βοΈ
Another nice thing about this approach is that it just works. Unlike view-based controllers, you donβt need to change anything about how ASP.NET Core is configured to have this organization structure work for you. β¨
[ Article ] : bit.do/apif
γ°γ°γ°γ°γ°γ°
#AspMvc #Core #API
@ProgrammingTip
In ASP.NET Core (and unlike ASP.NET 5 / Web API 2), Web API controllers are just controllers. π
You donβt need to inherit from a different base type or anything like that. β
Whatβs more, your API controllers should be returning DTOs that are separate from your underlying domain or data model. βοΈ
What Iβve found to be a better organization is to do away with the Controllers folder (or keep it around if youβre using view-based controllers) and instead use feature folders for your APIs. π
Iβm partial to having a root level API folder but if youβd prefer to put your features in the root of the project that would work, too. ππ»
Within each feature folder, you include the controller along with any model types it needs to work with, like this πΎ :
https://t.me/pgimg/124
Obviously one benefit of this approach is that itβs more cohesive. β
Things that change together are located physically next to one another, and the friction involved in moving between different folders with too many files in them is greatly reduced. βοΈ
Another nice thing about this approach is that it just works. Unlike view-based controllers, you donβt need to change anything about how ASP.NET Core is configured to have this organization structure work for you. β¨
[ Article ] : bit.do/apif
γ°γ°γ°γ°γ°γ°
#AspMvc #Core #API
@ProgrammingTip
Telegram
Programming Tips Resources
Apress - Real-Time Web Application Development.pdf
21.3 MB
Using Redis Cache in .NET Core π
Redis is a high performance distributed cache. Itβs great for storing data that you are going to need again and again in a short period of time when you donβt want to use processing power to βcreateβ that data again. β»οΈ
Think number crunching or heavy SQL queries for data that doesnβt change often. π«
Roll Your Own π€
First off. You can absolutely roll your own Redis Cache services abstracted by your own interfaces etc. β
You may find it a little difficult to find libraries that target .NET Core, but this will change over time. β³
In saying that, there is a β.NET Coreβ way of doing things that is a little different. It does tie you into the framework a little, but it abstracts away the caching completely and letβs Microsoft handle it and thatβs what we are going to go over today. π
https://t.me/pgimg/131
[ Article ] : bit.do/rcache
γ°γ°γ°γ°γ°γ°
#Redis #AspMvc #Core #Cache
@ProgrammingTip
Redis is a high performance distributed cache. Itβs great for storing data that you are going to need again and again in a short period of time when you donβt want to use processing power to βcreateβ that data again. β»οΈ
Think number crunching or heavy SQL queries for data that doesnβt change often. π«
Roll Your Own π€
First off. You can absolutely roll your own Redis Cache services abstracted by your own interfaces etc. β
You may find it a little difficult to find libraries that target .NET Core, but this will change over time. β³
In saying that, there is a β.NET Coreβ way of doing things that is a little different. It does tie you into the framework a little, but it abstracts away the caching completely and letβs Microsoft handle it and thatβs what we are going to go over today. π
https://t.me/pgimg/131
[ Article ] : bit.do/rcache
γ°γ°γ°γ°γ°γ°
#Redis #AspMvc #Core #Cache
@ProgrammingTip
Telegram
Programming Tips Resources
Dockerise .NET Core Apps π¦
In this tutorial, you will learn how to build and run your first ASP.NET Core docker image. π₯
We're going to walk through how you would add docker support to a pre-existing code base. π
Itβs incredibly easy to do. β
https://t.me/pgimg/136
[ Article ] : bit.do/dcker
γ°γ°γ°γ°γ°γ°
#AspMvc #Core #Docker
@ProgrammingTip
In this tutorial, you will learn how to build and run your first ASP.NET Core docker image. π₯
We're going to walk through how you would add docker support to a pre-existing code base. π
Itβs incredibly easy to do. β
https://t.me/pgimg/136
[ Article ] : bit.do/dcker
γ°γ°γ°γ°γ°γ°
#AspMvc #Core #Docker
@ProgrammingTip
Telegram
Programming Tips Resources
Coravel β°
.NET Core meets Laravel : Scheduling, Queuing, etc. β¨
Features π :
β’ Task Scheduling
β’ Queuing
Tired of using cron and Windows Task Schedulerβ
Want to use something easy that ties into your existing codeβ
In Startup.cs, put this in ConfigureServices() πΎ :
Look at the documentation to see what methods are availableβοΈ
https://t.me/pgimg/140
[ Github ] : bit.do/corevl
γ°γ°γ°γ°γ°γ°
#AspMvc #Core #Scheduler
@ProgrammingTip
.NET Core meets Laravel : Scheduling, Queuing, etc. β¨
Features π :
β’ Task Scheduling
β’ Queuing
Tired of using cron and Windows Task Schedulerβ
Want to use something easy that ties into your existing codeβ
In Startup.cs, put this in ConfigureServices() πΎ :
services.AddScheduler(scheduler =>
{
scheduler.Schedule(
() => Console.WriteLine("Run at 1pm utc during week days."))
.DailyAt(13, 00)
.Weekday();
});
Easy enoughβLook at the documentation to see what methods are availableβοΈ
https://t.me/pgimg/140
[ Github ] : bit.do/corevl
γ°γ°γ°γ°γ°γ°
#AspMvc #Core #Scheduler
@ProgrammingTip
Telegram
Programming Tips Resources
What's This and Can I Delete Itβ Examining a Default ASP.NET Core MVC Project π₯
I have a very simple two-step process I use whenever I create or join a new project.βπ»
I examine each folder and file, and ask "what's this, and can I delete itβ"
After all, deleting things (or demolishing them, as may be appropriate) is so, so satisfying. π
I would be much happier deleting all code that ever existed. π
To that end, we're going to examine a default ASP.NET Core project, created with ASP.NET Core 2.1 and Visual Studio 2017, to see what we absolutely have to keep and what can be thrown away. π
Let's get deletingβοΈ
https://t.me/pgimg/148
[ Article ] : kutt.it/NCtImP
γ°γ°γ°γ°γ°γ°
#AspMvc #Core
@ProgrammingTip
I have a very simple two-step process I use whenever I create or join a new project.βπ»
I examine each folder and file, and ask "what's this, and can I delete itβ"
After all, deleting things (or demolishing them, as may be appropriate) is so, so satisfying. π
I would be much happier deleting all code that ever existed. π
To that end, we're going to examine a default ASP.NET Core project, created with ASP.NET Core 2.1 and Visual Studio 2017, to see what we absolutely have to keep and what can be thrown away. π
Let's get deletingβοΈ
https://t.me/pgimg/148
[ Article ] : kutt.it/NCtImP
γ°γ°γ°γ°γ°γ°
#AspMvc #Core
@ProgrammingTip
Telegram
Programming Tips Resources
Sieve π
Clean & extensible Sorting, Filtering, and pagination for ASP.NET Core. βοΈ
Sieve is a simple, clean, and extensible framework for .NET Core that adds sorting, filtering, and pagination functionality out of the box. π
Most common use case would be for serving ASP.NET Core GET queries. β
Sample Request β‘οΈ :
https://t.me/pgimg/153
[ Github ] : github.com/Biarity/Sieve
[ Nuget ] : nuget.org/packages/Sieve
γ°γ°γ°γ°γ°γ°
#AspMvc #Core
@ProgrammingTip
Clean & extensible Sorting, Filtering, and pagination for ASP.NET Core. βοΈ
Sieve is a simple, clean, and extensible framework for .NET Core that adds sorting, filtering, and pagination functionality out of the box. π
Most common use case would be for serving ASP.NET Core GET queries. β
Sample Request β‘οΈ :
GET /GetPosts
?sorts= LikeCount,-created
&filters= LikeCount>10, Title@=awesome title,
&page= 1
&pageSize= 10
Try this package, It's super powerful and easy to use. π₯https://t.me/pgimg/153
[ Github ] : github.com/Biarity/Sieve
[ Nuget ] : nuget.org/packages/Sieve
γ°γ°γ°γ°γ°γ°
#AspMvc #Core
@ProgrammingTip
Telegram
Programming Tips Resources
Exploring .NET Core with Microservices, ASP.NET Core, and Entity Framework Core is a collection of five hand-picked chapters introducing you to the art of applying modern development practices and patterns to your .NET Core projects. π
In it, you'll get a quick overview of what ASP.NET Core and Entity Framework Core offer, along with an introduction to microservices and web applications using .NET Core tooling. β¨
You'll also get some tips on working with legacy code in this new environment. π€·π»ββοΈ
In short, this free eBook will get your feet wet and show you real-world examples that illustrate what's possible. π
https://t.me/pgimg/156
γ°γ°γ°γ°γ°γ°
#AspMvc #Core #Microservice #Book
@ProgrammingTip
In it, you'll get a quick overview of what ASP.NET Core and Entity Framework Core offer, along with an introduction to microservices and web applications using .NET Core tooling. β¨
You'll also get some tips on working with legacy code in this new environment. π€·π»ββοΈ
In short, this free eBook will get your feet wet and show you real-world examples that illustrate what's possible. π
https://t.me/pgimg/156
γ°γ°γ°γ°γ°γ°
#AspMvc #Core #Microservice #Book
@ProgrammingTip
Telegram
Programming Tips Resources
Programming Tips π‘
Exploring .NET Core with Microservices, ASP.NET Core, and Entity Framework Core is a collection of five hand-picked chapters introducing you to the art of applying modern development practices and patterns to your .NET Core projects. π In it, you'll get aβ¦
Exploring .NET Core with Microservices.pdf
12.1 MB
Exploring .NET Core with Microservices π
Author π : Dustin Metzgar
Publisher : Manning β¨
γ°γ°γ°γ°γ°γ°
#Book #AspMvc #Core #Microservice
@ProgrammingTip
Author π : Dustin Metzgar
Publisher : Manning β¨
γ°γ°γ°γ°γ°γ°
#Book #AspMvc #Core #Microservice
@ProgrammingTip
Awesome .NET Core π₯
A collection of awesome .NET core libraries, tools, frameworks and software. π
https://t.me/pgimg/159
[ Github ] : kutt.it/awscore
γ°γ°γ°γ°γ°γ°
#DotNet #Core #AspMvc
@ProgrammingTip
A collection of awesome .NET core libraries, tools, frameworks and software. π
https://t.me/pgimg/159
[ Github ] : kutt.it/awscore
γ°γ°γ°γ°γ°γ°
#DotNet #Core #AspMvc
@ProgrammingTip
Telegram
Programming Tips Resources
Clean Architecture with ASP.NET Core 2.1 π¦
The explosive growth of web frameworks and the demands of users have changed the approach to building web applications. π
Many challenges exist, and getting started can be a daunting prospect. Let's change that now. β
This talk provides practical guidance and recommendations. π
This video will cover architecture, technologies, tools, and frameworks. We will examine strategies for organizing your projects, folders and files. β‘οΈ
We will design a system that is simple to build and maintain - all the way from development to production. You leave this talk inspired and prepared to take your enterprise application development to the next level. π₯
https://t.me/pgimg/180
[ Video ] : kutt.it/cav
[ Source Code ] : kutt.it/cag
γ°γ°γ°γ°γ°γ°
#AspNet #Core #CleanCode
@ProgrammingTip
The explosive growth of web frameworks and the demands of users have changed the approach to building web applications. π
Many challenges exist, and getting started can be a daunting prospect. Let's change that now. β
This talk provides practical guidance and recommendations. π
This video will cover architecture, technologies, tools, and frameworks. We will examine strategies for organizing your projects, folders and files. β‘οΈ
We will design a system that is simple to build and maintain - all the way from development to production. You leave this talk inspired and prepared to take your enterprise application development to the next level. π₯
https://t.me/pgimg/180
[ Video ] : kutt.it/cav
[ Source Code ] : kutt.it/cag
γ°γ°γ°γ°γ°γ°
#AspNet #Core #CleanCode
@ProgrammingTip
Telegram
Programming Tips Resources
ββNotify Your Angular App Using SignalR π₯
In this small article we'll walk you through how to create a notification service using .NET Core 2.0 Web Api, .NET Core SignalR & Angular. π
Letβs get into business. β¨
[ Article ] : kutt.it/ngnoti
γ°γ°γ°γ°γ°γ°
#AspMvc #Core #Angular #SignalR
@ProgrammingTip
In this small article we'll walk you through how to create a notification service using .NET Core 2.0 Web Api, .NET Core SignalR & Angular. π
Letβs get into business. β¨
[ Article ] : kutt.it/ngnoti
γ°γ°γ°γ°γ°γ°
#AspMvc #Core #Angular #SignalR
@ProgrammingTip
Our new channel is here! π₯³
.NET Core / ASP.NET Core Channel π
A place to share Tips, Resources, and mostly Open-Source libraries about .NET Core & ASP.NET Core stuff. π₯
Join and share our new channel with your friends β‘οΈ:
@CoreTips βπ»
γ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈ
#AspMvc #Core #Channels
@ProgrammingTip
.NET Core / ASP.NET Core Channel π
A place to share Tips, Resources, and mostly Open-Source libraries about .NET Core & ASP.NET Core stuff. π₯
Join and share our new channel with your friends β‘οΈ:
@CoreTips βπ»
γ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈ
#AspMvc #Core #Channels
@ProgrammingTip
The Evolving Infrastructure of .NET Core β‘οΈ
It would be useful to take a brief look at the history of ASP.NET Core's infrastructure systems and the significant improvements that have been made in the last year or so. π
This post will be interesting if you are interested in build infrastructure or want a behind-the-scenes look at how we build a product as big as .NET Core. π₯
[ Article ] : kutt.it/netInfra
γ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈ
#Microsoft #AspMvc #Core #AspCore
@ProgrammingTip
It would be useful to take a brief look at the history of ASP.NET Core's infrastructure systems and the significant improvements that have been made in the last year or so. π
This post will be interesting if you are interested in build infrastructure or want a behind-the-scenes look at how we build a product as big as .NET Core. π₯
[ Article ] : kutt.it/netInfra
γ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈ
#Microsoft #AspMvc #Core #AspCore
@ProgrammingTip
Telegram
Programming Tips Resources
Kubernetes for .NET Developers βΈοΈ
Have you started building containerized application and struggled with scaling across multiple hostsβ
Would you like to simplify DevOps tasks such as deployment and configurationβ
Have you heard about Kubernetes and would like to learn moreβ
Then this presentation is for you. π
Kubernetes is an open source system for managing containerized applications across multiple hosts; providing basic mechanisms for deployment, maintenance, and scaling of applications. π₯
In this presentation, I will walk you through Kubernetes fundamentals, the high level architecture, how would you deploy an ASP.NET Core application to Kubernetes and finally how would you configure and launch auto-scaling, self-healing Kubernetes cluster. β‘οΈ
[ YouTube ] : youtu.be/uh4V2IjSrlI
[ Github ] : kutt.it/KubeAsp
γ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈ
#Kubernetes #DotNet #Core #AspMvc #AspCore
@ProgrammingTip
Have you started building containerized application and struggled with scaling across multiple hostsβ
Would you like to simplify DevOps tasks such as deployment and configurationβ
Have you heard about Kubernetes and would like to learn moreβ
Then this presentation is for you. π
Kubernetes is an open source system for managing containerized applications across multiple hosts; providing basic mechanisms for deployment, maintenance, and scaling of applications. π₯
In this presentation, I will walk you through Kubernetes fundamentals, the high level architecture, how would you deploy an ASP.NET Core application to Kubernetes and finally how would you configure and launch auto-scaling, self-healing Kubernetes cluster. β‘οΈ
[ YouTube ] : youtu.be/uh4V2IjSrlI
[ Github ] : kutt.it/KubeAsp
γ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈ
#Kubernetes #DotNet #Core #AspMvc #AspCore
@ProgrammingTip
Telegram
Programming Tips Resources
Blazor WebAssembly 3.2.0 now available π
Iβm thrilled to announce that Blazor WebAssembly is now officially released.
This is a fully-featured and supported release of Blazor WebAssembly that is ready for production use. β
Full stack web development with .NET is now here! β‘οΈ
[ Article ]: https://devblogs.microsoft.com/aspnet/blazor-webassembly-3-2-0-now-available/
γ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈ
#Blazor #DotNet #Core
@ProgrammingTip
Iβm thrilled to announce that Blazor WebAssembly is now officially released.
This is a fully-featured and supported release of Blazor WebAssembly that is ready for production use. β
Full stack web development with .NET is now here! β‘οΈ
[ Article ]: https://devblogs.microsoft.com/aspnet/blazor-webassembly-3-2-0-now-available/
γ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈ
#Blazor #DotNet #Core
@ProgrammingTip