Created
July 18, 2018 06:17
-
-
Save bizunas/d8e8e20530de32d8537988d1de3ee15b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Main(string[] args) | |
{ | |
Mapper.Initialize(cfg => | |
{ | |
cfg.CreateMissingTypeMaps = true; | |
cfg.ValidateInlineMaps = false; | |
cfg.CreateMap<Model, ModelDto>(); | |
}); | |
System.Collections.Generic.List<Model> models = new List<Model> { new Model(),new Model() }; | |
models.AsQueryable().UseAsDataSource().For<ModelDto>().GroupBy(x => x.Id).Dump(); | |
} | |
public class Model | |
{ | |
public int Id { get; set; } | |
} | |
public class ModelDto | |
{ | |
public int Id { get; set; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment