public Boolean CreateDatabase()
 {
     Boolean result = false;
     try
     {
         using (var context = new AgeasDriverDetails(DBConnectionString))
         {
             if (!context.DatabaseExists())
             {
                 context.CreateDatabase();
                 result = true;
             }
             context.Dispose();
         }
     }
     catch
     {
         result = false;
     }
     return result;
 }
        public List<JourneyDetails> GetJourneyList(IQueryable<JourneyDetails> JourneyQuery)
        {
            List<JourneyDetails> Journeylist = null;

            try
            {
                using (var context = new AgeasDriverDetails(DBConnectionString))
                {
                    if (context.DatabaseExists())
                    {
                        Journeylist = JourneyQuery.ToList();
                    }
                    context.Dispose();
                }
            }
            catch
            {
                Journeylist = null;
            }
            return Journeylist;
        }
        public List<LocationTable> GetlocationList(IQueryable<LocationTable> JourneyQuery)
        {
            List<LocationTable> Locationlist = null;

            try
            {
                using (var context = new AgeasDriverDetails(DBConnectionString))
                {
                    if (context.DatabaseExists())
                    {
                        Locationlist = JourneyQuery.ToList();
                    }
                    context.Dispose();
                }
            }
            catch
            {
                Locationlist = null;
            }
            return Locationlist;
        }
        public Boolean InsertLocation(LocationTable LocationDtls)
        {
            Boolean result = false;
            try
            {
                using (var context = new AgeasDriverDetails(DBConnectionString))
                {
                    if (context.DatabaseExists())
                    {

                        context.tblLocation.InsertOnSubmit(LocationDtls);
                        context.SubmitChanges();
                        result = true;
                    }
                    context.Dispose();
                }
            }
            catch
            {
                result = false;
            }
            return result;
        }