Ejemplo n.º 1
0
        public SchoolModel GetSchoolByID(int id)
        {
            try
            {
                using (var context = new Covid19ImpactSurveyEntities())
                {
                    var data    = context.Schools.FirstOrDefault(x => x.ID == id);
                    var results = data.Map();

                    return(results);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 2
0
        public SchoolModel GetSchoolByPrincipalDetails(string emisNo, string persalNo, string idNo)
        {
            try
            {
                using (var context = new Covid19ImpactSurveyEntities())
                {
                    var data    = context.Schools.FirstOrDefault(x => x.EMISNo == emisNo && x.PrincipalPersalNo == persalNo);
                    var results = data.Map();

                    return(results);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }