1. 引用RsCode.dll

  2. 映射

    using Rs.AutoMapper
    Class1 test;
    Class1Dto testDto;
    test.MapTo<testDto>();
    

[IgnoreMap]可忽略目标类某属性映射

PetaPoco.Page<>映射时,Items 单独用MapToList()

target.Items = info.Items.MapToList<ResourceInfoDto>();
target.CurrentPage = info.CurrentPage;
target.TotalItems = info.TotalItems;
target.TotalPages = info.TotalPages;

results matching ""

    No results matching ""