کتاب Visual Studio 2015 Succinctly
In Visual Studio 2015 Succinctly, author Alessandro Del Sole explains how to take advantage of the highly anticipated features in Microsoft Visual Studio 2015. Topics include sharing code between different types of projects, new options for debugging and diagnostics, and improving productivity with other services in the Visual Studio ecosystem, such as NuGet and Azure.
آموزش ASP.NET Web API
کتابخانه gauth
Sync Framework is a comprehensive synchronization platform that enables collaboration and offline access for applications, services, and devices. Sync Framework features technologies and tools that enable roaming, data sharing, and taking data offline. By using Sync Framework, developers can build synchronization ecosystems that integrate any application with data from any store, by using any protocol over any network.
من یک پروژه Worker ایجاد کردم و توی program.cs کد زیر رو استفاده کردیم
IHost host = Host.CreateDefaultBuilder(args) .ConfigureAppConfiguration((hostingContext, configuration) => { configuration.Sources.Clear(); IHostEnvironment env = hostingContext.HostingEnvironment; configuration .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true); //.AddJsonFile($"appsettings.{env.EnvironmentName}.json", true, true); IConfigurationRoot configurationRoot = configuration.Build(); }) .ConfigureServices((hostContext, services) => { services.Configure<SiteSettings>(options => hostContext.Configuration.Bind(options));
چرا در نگارش 3 با تغییر به JSON.NET همچنان باز هم نال دریافت میکنم؟
public void ConfigureServices(IServiceCollection services) { services.AddMvc() .AddNewtonsoftJson(); }
[Route("api/[controller]")] [Authorize] [ApiController] public class UserApiController : Controller { private readonly IUserService _userService; public UserApiController(IUserService userService) { _userService = userService; } [HttpPost("[action]")] public async Task<IActionResult> GetCustomers([FromBody] CustomersFilterViewModel filter) { var model = await _userService.GetCustomers(filter);
return Ok(model); }}
const options = {headers: {'Content-Type': 'application/json'}}; axios.post(url, JSON.stringify({ data}), options)
public class Startup { private readonly IConfiguration _config; public Startup(IConfiguration config) { _config = config; } public void ConfigureServices(IServiceCollection services) { var value = _config["key"]; } public void Configure(IApplicationBuilder app, IConfiguration config) { var value = config["key"]; } }
using Microsoft.AspNetCore.SpaServices.AngularCli; using Microsoft.AspNetCore.SpaServices.VueCli; // ... namespace Test { public class Startup { // ... public void ConfigureServices(IServiceCollection services) { // ... // In production, the SPA files will be served from this directory services.AddSpaStaticFiles(configuration => { configuration.RootPath = "ClientApp/dist"; }); } public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { // ... app.UseRouting(); app.UseEndpoints(endpoints => { // ... }); app.UseSpa(spa => { spa.Options.SourcePath = "ClientApp"; if (env.IsDevelopment()) { // spa.UseAngularCliServer(npmScript: "start"); // spa.UseVueCliServer(npmScript: "serve"); } }); } } }