public async Task <GetSources> GetSourceForEdit(EntityDto input) { var output = new GetSources(); var src = _sourceRepository .GetAll().Where(p => p.Id == input.Id); if (src.Count() > 0) { var source = (from a in src select new SourceListDto { Id = a.Id, SourceCode = a.SourceCode, SourceName = a.SourceName, TypeId = a.TypeId, TypeName = a.SourceTypes.SourceTypeName, ColorCode = a.ColorCode }).FirstOrDefault(); output = new GetSources { Sources = source }; } return(output); }
public void GetSourcesTest() { GetSources request = new GetSources(); var result = JsonConvert.DeserializeObject <KodiJSON.Files.Response.GetSourcesResponse>(ExecuteTest.GetResponse(request)); }
public async Task <IEnumerable <Source> > Handle(GetSources request, CancellationToken cancellationToken) { var sources = await _context.Sources.ToListAsync(cancellationToken); return(sources); }