public async Task <FizetesimodResult> Read([FromQuery] string sid, [FromBody] string maszk) { var result = new FizetesimodResult(); using (var tr = await _context.Database.BeginTransactionAsync()) try { result.Result = await FizetesimodBll.ReadAsync(_context, sid, maszk); tr.Commit(); } catch (Exception ex) { tr.Rollback(); result.Error = ex.InmostMessage(); } return(result); }
public async Task <FizetesimodResult> CreateNew([FromQuery] string sid) { var result = new FizetesimodResult(); using (var tr = await _context.Database.BeginTransactionAsync()) try { result.Result = new List <FizetesimodDto> { await FizetesimodBll.CreateNewAsync(_context, sid) }; tr.Commit(); } catch (Exception ex) { tr.Rollback(); result.Error = ex.InmostMessage(); } return(result); }