Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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; }
- }
Add Comment
Please, Sign In to add comment