Let’s suppose I have the following task: var task = _entityManager.UseRepositoryAsync(async (repo) => { IEnumerable<Entity> found = //... Get from repository return new { Data = found.ToList() }; } What is the type of task? Actually, it turns out to be: System.Threading.Tasks.Task<'a>, where 'a is anonymous type: { List<object> Data } How can I explicitly […]
The post How to specify anonymous object as generic parameter? appeared first on BlogoSfera.