مدل بایندر برای تاریخ شمسی
How To Use: //In Startup.cs: public void ConfigureServices(IServiceCollection services) { services.AddMvcCore(options => { options.ModelBinderProviders.Insert(0, new PersianDateModelBinderProvider()); }); } //In Actions: public async Task<IActionResult> SampleAction(DateTime birthDate) { if (ModelState.IsValid) { //birthDate is valid } else { birthDate is wrong } ... }
سری آشنایی با Blockchain
موشکافی ASP.NET 5
ASP.NET 5 is an entirely new web stack, rebuilt from the ground up to run fast, cross-platform, and completely configurable. Join David Fowler, one of the architects of ASP.NET 5, as he goes deep into the core of ASP.NET 5. What's the hosting model? How does the HTTP stack work? How do middleware and NuGet packages get pulled in to compose your application? How do the different servers (IIS, Kestrel, WebListener, etc.) actually work? How can you take advantage of these things to build lean, fast, optimized web apps on the new ASP.NET 5 platform? Come find out!
In this post, we are going to write about what we consider to be the best practices while developing the .NET Core Web API project. How we can make it better and how to make it more maintainable.
We are going to go through the following sections:
Summary
It’s pretty easy to differentiate use cases for Result and exceptions. Whenever the failure is something you expect and know how to deal with – catch it at the lowest level possible and convert into a Result instance. If you don’t know how to deal with it – let it propagate and interrupt the current business operation. Don’t catch exceptions you don’t know what to do about.