اشتراک‌ها
مقاله ای مفید در مورد برنامه نویسی غیرهمزمان از مد تورگسن

Asynchronous methods in the upcoming versions of Visual Basic and C# are a great way to get the callbacks out of your asynchronous programming. In this article, I’ll take a closer look at what the new await keyword actually does, starting at the conceptual level and working my way down to the iron. 

مقاله ای مفید در مورد برنامه نویسی غیرهمزمان از مد تورگسن
بازخوردهای دوره
تبدیلگر تاریخ شمسی برای AutoMapper
ممنون. آقای نصیری من کدهای شمارو استفاده کردم و خطای زیر برای من رخ داد :

Type 'System.String' does not have a default constructor

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ArgumentException: Type 'System.String' does not have a default constructor


من به این صورت نوشتم :

            CreateMap<DateTime, string>().ConvertUsing(new DateTimeToPersianDateTimeConverter());

            CreateMap<User, UserViewModel>();

این هم model و viewmodel :

 public class User : IdentityUser<long, UserLogin, UserRole, UserClaim>
    {
        public virtual DateTime RegisterDate { get; set; }
        // bla bla
    }


  public class UserViewModel
    {
        public string RegisterDate { get; set; }
    }

public List<UserViewModel> GetUsersByPage(int pageNumber, string pagerSortBy, string pagerSortOrder, string term, out int records,
            int recordsPerPage)
{
    //bla bla bla
    return users.Skip(skipRecords) /*این خط خطا داره*/
                .Take(recordsPerPage)
                .Project(_mappingEngine).To<UserViewModel>().Future().ToList();
}

ولی وقتی اینطوری استفاده می‌کنم خطا نمیده ولی خب به درد نمیخوره. من میخوام تبدیلش کنم به فارسی :

CreateMap<User, UserViewModel>()
.ForMember(d => d.RegisterDate, m => m.MapFrom(s => s.RegisterDate.ToString()));

ممنون میشم راهنمایی کنید.
نظرات مطالب
ایجاد جداول بهینه سازی شده برای حافظه در SQL Server 2014
 موقع اجرای دستور  ALTER DATABASE SQL2014_Demo 
    ADD FILEGROUP MemFG CONTAINS MEMORY_OPTIMIZED_DATA 
GO 
این خطا رو میده لطفا راهنمایم کنید
Msg 534, Level 15, State 72, Line 37
'FILEGROUP ... CONTAINS MEMORY_OPTIMIZED_DATA' failed because it is not supported in the edition of this SQL Server instance 'TFS-SERVER'. See books online for more details on feature support in different SQL Server editions.
نظرات مطالب
استفاده از Fluent Validation در برنامه‌های ASP.NET Core - قسمت پنجم - اعتبارسنجی تنظیمات آغازین برنامه
در یک پروژه nullable ref types فعال است و در دیگری خیر:
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <Nullable>enable</Nullable>
  </PropertyGroup>
اگر می‌خواهید هر دو مثل هم عمل کنند، باید به اخطارهای کامپایلر دقت کنید و Name را nullable تعریف کنید:
public class Person
{
     public string? Name { get; set; }
     public string? Family { get; set; }
اشتراک‌ها
نحوه حذف رفرنس های استفاده نشده در پروژه با استفاده از ریشارپر

This command allows cleaning up project and assembly references that have no actual usages in source code. You can apply this command on a project, solution folder, or the entire solution. Before deletion is complete, you will be able to see all references that are going to be removed and. if necessary, preserve the ones that you want to keep.

نحوه حذف رفرنس های استفاده نشده در پروژه با استفاده از ریشارپر