public async Task <WatchedRecordDto> CreateWatchedRecordAsync(Guid domainId, CreateWatchedRecordData data) { var domain = await _domainsService.GetDomainAsync(domainId); var record = _mapper.Map <WatchedRecord>(data); domain.WatchedRecords.Add(record); await _context.SaveChangesAsync(); return(_mapper.Map <WatchedRecordDto>(record)); }
public Task <WatchedRecordDto> CreateWatchedRecord(Guid domainId, CreateWatchedRecordData data) { return(_recordsService.CreateWatchedRecordAsync(domainId, data)); }