Exemplo n.º 1
0
        public async Task <FotozasResult> Check([FromBody] string linkparam)
        {
            var result = new FotozasResult();

            using (var tr = await _context.Database.BeginTransactionAsync())
                try
                {
                    result.Result = await FotozasBll.CheckAsync(_context, _hubcontext, _config, linkparam);

                    tr.Commit();
                }
                catch (Exception ex)
                {
                    tr.Rollback();
                    result.Error = ex.InmostMessage();
                }

            return(result);
        }
Exemplo n.º 2
0
        public async Task <BaseResults.EmptyResult> ClearLink([FromQuery] string sid, [FromBody] IratDto dto)
        {
            var result = new BaseResults.EmptyResult();

            using (var tr = await _context.Database.BeginTransactionAsync())
                try
                {
                    await FotozasBll.ClearLinkAsync(_context, sid, dto);

                    tr.Commit();
                }
                catch (Exception ex)
                {
                    tr.Rollback();
                    result.Error = ex.InmostMessage();
                }

            return(result);
        }