روشی جهت تهیه کوئری از API
کتابخانه Unicoder.js
کار با کوکیها در ASP.NET Core
سلام؛ آیا استفاده از IProtectionProvider جهت درج اطلاعات در بخش Payload یک JWT Token را پیشنهاد میکنید؟
انتشار ASP.NET Identity 2.2.0
Note: This is the source code for ASP.NET Identity 2.2. ASP.NET Identity 3.0 is part of ASP.NET 5 and the source code is on GitHub.
DateTimeOffsetToBinaryConverter
- DateTimeOffset to binary-encoded 64-bit value (stores it as a long, slight reduction in precision)
DateTimeOffsetToBytesConverter
- DateTimeOffset to byte array (stores it as a 12 byte array, 8 bytes for time, 4 bytes for offset. Full precision.)
DateTimeOffsetToStringConverter
- DateTimeOffset to string (ISO 8601 string including timezone)
protected override void OnModelCreating(ModelBuilder builder) { base.OnModelCreating(builder); if (Database.ProviderName == "Microsoft.EntityFrameworkCore.Sqlite") { // SQLite does not have proper support for DateTimeOffset via Entity Framework Core, see the limitations // here: https://docs.microsoft.com/en-us/ef/core/providers/sqlite/limitations#query-limitations // To work around this, when the Sqlite database provider is used, all model properties of type DateTimeOffset // use the DateTimeOffsetToBinaryConverter // Based on: https://github.com/aspnet/EntityFrameworkCore/issues/10784#issuecomment-415769754 // This only supports millisecond precision, but should be sufficient for most use cases. foreach (var entityType in builder.Model.GetEntityTypes()) { var properties = entityType.ClrType.GetProperties().Where(p => p.PropertyType == typeof(DateTimeOffset)); foreach (var property in properties) { builder .Entity(entityType.Name) .Property(property.Name) .HasConversion(new DateTimeOffsetToBinaryConverter()); } } } }
Input Validation for me is about validating the user input. Some people call "Name must not be empty" a business rule, I think about it as input validation. Business Rules validation is more complex, because a business rule for me is not "Name must not be empty", it is a definition of a state in the system that requires an action. Here is a definition of a business rule:
An order should be payed within 30 days, this duration can be extended, to a maximum of three times.
Now you can upgrade any .NET application to the latest version of .NET inside of Visual Studio! We are happy to introduce it as a Visual Studio extension and will upgrade your .NET Framework or .NET Core web- and desktop apps. In this video, Olia shows you how to get the extension and start to update your projects to the latest version of NET in minutes.
مقایسه HTTP/2 PUSH و HTTP Preload
HTTP/2 PUSH is a feature that lets a server pre-emptively push resources to the client (without a corresponding request). HTTP Preload is a way to indicate to the browser resources it would require while loading the current page. In this post, we will discuss the key differences between PUSH and Preload, with a detailed explanation of which one to choose based on your use case.