Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }