Exemple #1
0
        public HospitalModel GenerateRandomHosptialModel()
        {
            HospitalModel result = new HospitalModel()
            {
                Address      = randomData.GetRandomDigits(3, 5),
                City         = randomData.GetRandomCity(),
                HospitalName = randomData.GetRandomCompanyName(3),
                State        = randomData.GetRandomState()
            };

            result.SetOriginalValues();
            return(result);
        }
Exemple #2
0
        public HospitalModel FetchARandomHospitalFromDatabase()
        {
            //HERE IS AN EXAMPLE WHO HOW WE WOULD DO THIS
            //string sql = "SELECT TOP 100 FROM Hospital";
            //return GetRandomHospitalFromSQLStatement(sql);

            //Hard coding this because this example has no db
            var result = new HospitalModel()
            {
                HospitalName = "Childrens", Address = "123 Jump st", City = "Minneapolis", State = "MN"
            };

            result.SetOriginalValues();
            return(result);
        }
Exemple #3
0
        public HospitalModel FetchHospitalRandomFromDatabase_ByState(string state)
        {
            //string sql = "select * from hosptial where state = " + state;
            //return GetRandomHosptialFromSQLStatement(sql);

            var result = new HospitalModel()
            {
                HospitalName = "Childrens",
                Address      = "123 jump st",
                City         = "mpls",
                State        = state
            };

            result.SetOriginalValues();
            return(result);
        }
Exemple #4
0
        public HospitalModel FetchHospitalFromDatabase_ById(Guid id)
        {
            //string sql = "Select * from Hosptial where HospitalId = " + id;
            //return GetRandomHospitalFromSQLStatement(sql);

            var result = new HospitalModel()
            {
                HospitalId   = id,
                HospitalName = "Childrens",
                Address      = "123 jump st",
                City         = "mpls",
                State        = "mn"
            };

            result.SetOriginalValues();
            return(result);
        }
Exemple #5
0
        public HospitalModel FetchHospitalFromDatabase_ByName(string name)
        {
            //string sql = "Select * from Hospital where name = " + name;
            //return GetRandomHospitalFromSQLStatement(sql);

            //SEE THE COMMENTS ON THE PRVIOUS LINES
            var result = new HospitalModel()
            {
                HospitalName = name,
                Address      = "123 jump st",
                City         = "mpls",
                State        = "mn"
            };

            result.SetOriginalValues();
            return(result);
        }