Ejemplo n.º 1
0
        public async Task <IActionResult> Deletes(string IDS)
        {
            try
            {
                if (!string.IsNullOrEmpty(IDS) && IDS.Length > 0)
                {
                    bool flag = false;
                    using (var uow = _uowFactory.Create())
                    {
                        flag = await _SysRoleRepository.DeletesAsync(IDS);

                        uow.SaveChanges();
                    }
                    if (flag)
                    {
                        return(Ok(new { status = true, message = "success" }));
                    }
                    else
                    {
                        return(Ok(new { status = false, message = "error" }));
                    }
                }
                else
                {
                    return(Ok(new { status = false, message = "dels error" }));
                }
            }
            catch (Exception ex)
            {
                return(Ok(new { status = false, message = ex.Message }));
            }
        }