private static void GetAllUsers() { UsersBL bl = new UsersBL(); List <Users> l = new List <Users>(); try { l = bl.GetAll(); foreach (Users e in l) { Console.WriteLine($"{e.LoginId},{e.Password},{e.Role}"); } if (l.Count > 0) { Console.WriteLine("Succes"); } else { Console.WriteLine("Not success"); } } catch (UniversityException e) { Console.WriteLine(e.Message); } }
GetAll() { Response <dynamic> result2 = new Response <dynamic>(); var result = userBL.GetAll(); result2.Result = result.Result; result2.Message = result.Message; if (result.Result == Asteri.Lib.DTO.Response.Results.success) { result2.Data = result.Data.Select(x => new { Id = x.Id.ToString(), x.User, x.UserNames, x.UsersLastNames, x.Email, x.IsActive }); } return(Json(result2, JsonRequestBehavior.AllowGet)); }