Beispiel #1
0
        static void Main(string[] args)
        {
            SdeDBRepository repository = new SdeDBRepository();
            var             users      = repository.GetAllUsers();

            Console.WriteLine("----------------------------------");
            Console.WriteLine("CategoryId\tCategoryName");
            Console.WriteLine("----------------------------------");
            foreach (var user in users)
            {
                Console.WriteLine("{0}\t\t{1}", user.EmailId, user.UserPassword);
            }
        }
Beispiel #2
0
        public JsonResult GetAllUsers()
        {
            List <Users> users =
                new List <Users>();

            try
            {
                users = repository.GetAllUsers();
            }
            catch (Exception ex)
            {
                users = null;
            }
            return(Json(users));
        }