This article provides an introduction to a lightweight API for ASP.NET web services provided by DotNetify.SignalR NuGet package that can reduce a lot of boilerplate code when implementing real-time updates, and provide an example of how to create a real-time web component with VueJS without using Node.JS build.
به همراه NET Core 2.1.، یک HttpClientFactory توکار توسط مایکروسافت ارائه شدهاست:
HttpClientFactory in ASP.NET Core 2.1 (Part 2) Defining Named and Typed Clients
به این ترتیب برای مثال جهت کار با یک آدرس مشخص، میتوان تنظیمات آنرا یکبار در آغاز برنامه ثبت کرد:
public void ConfigureServices(IServiceCollection services) { services.AddHttpClient("github", c => { c.BaseAddress = new Uri("https://api.github.com/"); c.DefaultRequestHeaders.Add("User-Agent", "HttpClientFactory-Sample"); // Github requires a user-agent }); services.AddHttpClient(); }
IHttpClientFactory _httpClientFactory; public MyController(IHttpClientFactory httpClientFactory) { _httpClientFactory = httpClientFactory; } public IActionResult Index() { //This client doesn’t have any special configuration applied var defaultClient = _httpClientFactory.CreateClient(); //This client has the header and base address configured for the “github” client above. var gitHubClient = _httpClientFactory.CreateClient("github"); return View(); }
سری مقدمات DDD
زندگی یک توسعه دهندهی PHP
Entity Framework Core 2.0 introduces global query filters that can be applied to entities when a model is created. It makes it easier to build multi-tenant applications and support soft deleting of entities. This blog post gives a deeper overview of how to use global query filters in real-life applications and how to apply global query filters to domain entities automatically.
نسخه RC2 برای ASP.NET Core ارایه شد
This post shows how to import and export .xls or .xlsx (Excel files) in ASP.NET Core. And when thinking about dealing with excel with .NET, we always look for third-party libraries or component. And one of the most popular .net library that reads and writes Excel 2007/2010 files using the Open Office Xml format (xlsx) is EPPlus. However, at the time of writing this post, this library is not updated to support .NET Core. But there exists an unofficial version of this library EPPlus.Core which can do the job of import and export xlsx in ASP.NET Core. This works on Windows, Linux and Mac.