"Going forward, we do not plan to evolve Visual Basic as a language," the .NET team said. "This supports language stability and maintains compatibility between the .NET Core and .NET Framework versions of Visual Basic. Future features of .NET Core that require language changes may not be supported in Visual Basic. Due to differences in the platform, there will be some differences between Visual Basic on .NET Framework and .NET Core."
سلام
جهت استفاده از اطلاعات موجود در Session بصورت زیر در program فعال کردم:
builder.Services.AddSession(options => { options.IdleTimeout = TimeSpan.FromSeconds(30); options.Cookie.HttpOnly = true; options.Cookie.IsEssential = true; }); app.UseSession();
در زمان اجرا پیغام خطای زیر زیر صادر شده:
'Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: Microsoft.AspNetCore.Session.ISessionStore Lifetime: Transient ImplementationType: Microsoft.AspNetCore.Session.DistributedSessionSto re': Unable to resolve service for type 'Microsoft.Extensions.Caching.Distributed.IDistrib utedCache' while attempting to activate 'Microsoft.AspNetCore.Session.DistributedSessionSt ore'.)'
آنچه که متوجه شدم باید کتابخانه Microsoft.Extensions.Caching.StackExchangeRedis نصب شود.
سوالم اینه که آیا نصب کتابخانه دوم ضروریه؟
معرفی Dev Home
تولید پویای رشته Sql و ارسال پارامتر برای عملگر Like
.MainTableDataSource(dataSource => { dataSource.GenericDataReader( providerName : "System.Data.SqlServerCe.4.0", connectionString : @"Data Source=data.sdf;password=******", sql : "Select [VoucherRows].[Description] AS [Description],[VoucherRows].[Creditor] AS [Creditor],[VoucherRows].[Debtor] AS [Debtor],[Vouchers].[Number] AS [Number], [Vouchers].[SubmitDate] AS [SubmitDate] From [VoucherRows] AS [VoucherRows],[Vouchers] AS [Vouchers] Where [Vouchers].[Id] = [VoucherRows].[VoucherId] And [Vouchers].[Number] >= @p1 And [Vouchers].[Number] <= @p2 And [Vouchers].[Description] Like '%' + @p3 + '%' Order By [Vouchers].[SubmitDate] DESC,[Vouchers].[Number] ASC", parametersValues : new object[] {50,100,"مقدار"} ); })
فرق بین فقط تست نوشتن و TDD
مراحل تنظیم Let's Encrypt در IIS
The Problem
What they neglect to say is all that testability and persistence ignorance flies right out the window when you create a new ASP.NET Web Application using the MVC template and "Individual User Accounts" authentication. What you get is a single-layered application, tightly coupled to Entity Framework, that:
-
Ignores the patterns that facilitate testing, including: the repository pattern, unit of work pattern, and dependency injection;
-
Forces you to implement their
IUser
interface in your application’s User entity, thereby coupling it to ASP.NET Identity; -
Eliminates any clear separation between your entities, persistence concerns, and business logic. Persistence ignorance? Forget about it.
Thankfully, due to the extensibility designed into ASP.NET Identity, it is possible to ditch the reference to the Microsoft.AspNet.Identity.EntityFramework
assembly and write a custom implementation that can address these and other architectural issues. Just be forewarned: it is not a trivial undertaking, and you’ll have to put up with some code smell that is baked into the Microsoft.AspNet.Identity.Core
assembly.
عدم سازگاری با EF
با سلام و احترام
ممنون از پاسخ شما
این تست کرده بودم میتونید خالی نبودن متغیر فوق ببینید اینم فیلدهای اصلی این کلاس
#region Properties /// <summary> /// Gets or sets the product variant identifier /// </summary> public int ProductVariantId { get; set; } /// <summary> /// Gets or sets the product identifier /// </summary> public int ProductId { get; set; } /// <summary> /// Gets or sets the name /// </summary> public string Name { get; set; } /// <summary> /// Gets or sets the SKU /// </summary> public string SKU { get; set; } /// <summary> /// Gets or sets the description /// </summary> public string Description { get; set; } /// <summary> /// Gets or sets the admin comment /// </summary> public string AdminComment { get; set; } /// <summary> /// Gets or sets the manufacturer part number /// </summary> public string ManufacturerPartNumber { get; set; } /// <summary> /// Gets or sets a value indicating whether the product variant is gift card /// </summary> public bool IsGiftCard { get; set; } /// <summary> /// Gets or sets the gift card type /// </summary> public int GiftCardType { get; set; } /// <summary> /// Gets or sets a value indicating whether the product variant is download /// </summary> public bool IsDownload { get; set; } /// <summary> /// Gets or sets the download identifier /// </summary> public int DownloadId { get; set; } /// <summary> /// Gets or sets a value indicating whether this downloadable product can be downloaded unlimited number of times /// </summary> public bool UnlimitedDownloads { get; set; } /// <summary> /// Gets or sets the maximum number of downloads /// </summary> public int MaxNumberOfDownloads { get; set; } /// <summary> /// Gets or sets the number of days during customers keeps access to the file. /// </summary> public int? DownloadExpirationDays { get; set; } /// <summary> /// Gets or sets the download activation type /// </summary> public int DownloadActivationType { get; set; } /// <summary> /// Gets or sets a value indicating whether the product variant has a sample download file /// </summary> public bool HasSampleDownload { get; set; } /// <summary> /// Gets or sets the sample download identifier /// </summary> public int SampleDownloadId { get; set; } /// <summary> /// Gets or sets a value indicating whether the product has user agreement /// </summary> public bool HasUserAgreement { get; set; } /// <summary> /// Gets or sets the text of license agreement /// </summary> public string UserAgreementText { get; set; } /// <summary> /// Gets or sets a value indicating whether the product variant is recurring /// </summary> public bool IsRecurring { get; set; } /// <summary> /// Gets or sets the cycle length /// </summary> public int CycleLength { get; set; } /// <summary> /// Gets or sets the cycle period /// </summary> public int CyclePeriod { get; set; } /// <summary> /// Gets or sets the total cycles /// </summary> public int TotalCycles { get; set; } /// <summary> /// Gets or sets a value indicating whether the entity is ship enabled /// </summary> public bool IsShipEnabled { get; set; } /// <summary> /// Gets or sets a value indicating whether the entity is free shipping /// </summary> public bool IsFreeShipping { get; set; } /// <summary> /// Gets or sets the additional shipping charge /// </summary> public decimal AdditionalShippingCharge { get; set; } /// <summary> /// Gets or sets a value indicating whether the product variant is marked as tax exempt /// </summary> public bool IsTaxExempt { get; set; } /// <summary> /// Gets or sets the tax category identifier /// </summary> public int TaxCategoryId { get; set; } /// <summary> /// Gets or sets a value indicating how to manage inventory /// </summary> public int ManageInventory { get; set; } /// <summary> /// Gets or sets the stock quantity /// </summary> public int StockQuantity { get; set; } /// <summary> /// Gets or sets a value indicating whether to display stock availability /// </summary> public bool DisplayStockAvailability { get; set; } /// <summary> /// Gets or sets a value indicating whether to display stock quantity /// </summary> public bool DisplayStockQuantity { get; set; } /// <summary> /// Gets or sets the minimum stock quantity /// </summary> public int MinStockQuantity { get; set; } /// <summary> /// Gets or sets the low stock activity identifier /// </summary> public int LowStockActivityId { get; set; } /// <summary> /// Gets or sets the quantity when admin should be notified /// </summary> public int NotifyAdminForQuantityBelow { get; set; } /// <summary> /// Gets or sets a value indicating whether to allow orders when out of stock /// </summary> public int Backorders { get; set; } /// <summary> /// Gets or sets the order minimum quantity /// </summary> public int OrderMinimumQuantity { get; set; } /// <summary> /// Gets or sets the order maximum quantity /// </summary> public int OrderMaximumQuantity { get; set; } /// <summary> /// Gets or sets the warehouse identifier /// </summary> public int WarehouseId { get; set; } /// <summary> /// Gets or sets a value indicating whether to disable buy button /// </summary> public bool DisableBuyButton { get; set; } /// <summary> /// Gets or sets a value indicating whether to show "Call for Pricing" or "Call for quote" instead of price /// </summary> public bool CallForPrice { get; set; } /// <summary> /// Gets or sets the price /// </summary> public decimal Price { get; set; } /// <summary> /// Gets or sets the old price /// </summary> public decimal OldPrice { get; set; } /// <summary> /// Gets or sets the product cost /// </summary> public decimal ProductCost { get; set; } /// <summary> /// Gets or sets a value indicating whether a customer enters price /// </summary> public bool CustomerEntersPrice { get; set; } /// <summary> /// Gets or sets the minimum price entered by a customer /// </summary> public decimal MinimumCustomerEnteredPrice { get; set; } /// <summary> /// Gets or sets the maximum price entered by a customer /// </summary> public decimal MaximumCustomerEnteredPrice { get; set; } /// <summary> /// Gets or sets the weight /// </summary> public decimal Weight { get; set; } /// <summary> /// Gets or sets the length /// </summary> public decimal Length { get; set; } /// <summary> /// Gets or sets the width /// </summary> public decimal Width { get; set; } /// <summary> /// Gets or sets the height /// </summary> public decimal Height { get; set; } /// <summary> /// Gets or sets the picture identifier /// </summary> public int PictureId { get; set; } /// <summary> /// Gets or sets the available start date and time /// </summary> public DateTime? AvailableStartDateTime { get; set; } /// <summary> /// Gets or sets the shipped end date and time /// </summary> public DateTime? AvailableEndDateTime { get; set; } /// <summary> /// Gets or sets a value indicating whether the entity is published /// </summary> public bool Published { get; set; } /// <summary> /// Gets or sets a value indicating whether the entity has been deleted /// </summary> public bool Deleted { get; set; } /// <summary> /// Gets or sets the display order /// </summary> public int DisplayOrder { get; set; } /// <summary> /// Gets or sets the date and time of instance creation /// </summary> public DateTime CreatedOn { get; set; } /// <summary> /// Gets or sets the date and time of instance update /// </summary> public DateTime UpdatedOn { get; set; } /// <summary> /// Gets or sets CouponCreated /// </summary> public bool? CouponetCreated { get; set; } /// <summary> /// Gets or sets the date and time of CouponCreated /// </summary> public DateTime? CouponetCreatedOn { get; set; } #endregion
Install-Package Notificatio.TelegramClient
var api = NotificatioApi.Initialize(" Your Hash_Key"); api.SendMessage("Phone Number", "this is a test Message");
$.ajax({ url: "http://www.api.notificatio.me/v1/user/message", type: "POST", dataType: "json", crossDomaint: true, data: { phoneNumber: "your_phone_number", apiHash: "your_api_hash", message: "your_message" }, cache: false, success: function() { // Your code to handle success message sent }, error: function(error) { // Your code to handle error } });