Esempio n. 1
0
        public List <viewUpazila> GetUpazilaInfo(Upazila upazila)
        {
            string sql    = string.Format(@"SELECT  [UpazilaCode],[UpazilaNameBangla] FROM [dbo].[viewUpazila] WHERE [DistrictCode]='{0}'", upazila.DistrictCode);
            var    result = _unitOfWork.context.Database.SqlQuery <viewUpazila>(sql).ToList();

            return(result);
        }
Esempio n. 2
0
        public List <Upazila> GetUpazilaByDistrictCode(Upazila query)
        {
            List <Upazila> result = new List <Upazila>();

            string sql = string.Format(@"SELECT DISTINCT  s.DistrictCode,u.UpazilaCode ,u.UpazilaName,u.UpazilaNameBangla
                                        FROM dbo.TPDGeoLocation s
                                        inner join GeoLocation.dbo.Upazila u on u.DistrictCode=s.DistrictCode where s.DistrictCode='{0}' and u.UpazilaName like '%{1}%'", query.DistrictCode, query.UpazilaName);

            result = _unitOfWork.context.Database.SqlQuery <Upazila>(sql).ToList();
            return(result);
        }