public async Task <TermekdijResult> Read([FromQuery] string sid, [FromBody] string maszk) { var result = new TermekdijResult(); using (var tr = await _context.Database.BeginTransactionAsync()) try { result.Result = await TermekdijBll.ReadAsync(_context, sid, maszk); tr.Commit(); } catch (Exception ex) { tr.Rollback(); result.Error = ex.InmostMessage(); } return(result); }
public async Task <TermekdijResult> Get([FromQuery] string sid, [FromBody] int key) { var result = new TermekdijResult(); using (var tr = await _context.Database.BeginTransactionAsync()) try { result.Result = new List <TermekdijDto> { await TermekdijBll.GetAsync(_context, sid, key) }; tr.Commit(); } catch (Exception ex) { tr.Rollback(); result.Error = ex.InmostMessage(); } return(result); }