public Response<string> CreateSession(StartSessionModel objReq)
 {
     Response<string> response = new Response<string>();
     List<string> objResp = new List<string>();
     try
     {
         Session obj = new Session();
         if (CheckRequestIsvalidornot(this.Request))
         {
             objDbMethodV2 = new Dal.DbMethodsV2();
             if (objDbMethodV2.CreateSession(objReq))
                 response.Create(true, Messages.FormatMessage(Messages.Success, "Your session has been created"), Messages.AppVersion, objResp);
             else
                 response.Create(false, Messages.FormatMessage(Messages.InvalidReq), Messages.AppVersion, objResp);
         }
     }
     catch (Exception ex)
     {
         object session = new JavaScriptSerializer().Serialize(objReq);
         LogManager.Error("Error occured while Processing Webservice request :{0}", ex, session, ex.Message);
         response.Create(false, Messages.FormatMessage(Messages.ErrorOccure), Messages.AppVersion, objResp);
     }
     return response;
 }
        internal bool CreateSession(StartSessionModel objReq)
        {
            using (var db=new WizzDataContext())
            {
                try
                {
                    var uniqueRequestData = db.tblStudentRequests.Where(x => x.fkUserId == Convert.ToInt64(objReq.userId) && x.isDelete == false).FirstOrDefault();
                    tblSession sessionObj = new tblSession();
                    sessionObj.createdDate = DateTime.UtcNow;
                    sessionObj.fromTime = timeConversionMethod(objReq.fromTime);
                    sessionObj.toTime = timeConversionMethod(objReq.toTime);
                    sessionObj.uniqueRequestId = uniqueRequestData.uniqueStudentRequestId;
                    sessionObj.isDelete = false;
                    sessionObj.updatedDate = DateTime.UtcNow;
                    sessionObj.studentId = Convert.ToInt64(objReq.userId);
                    sessionObj.tutorId = Convert.ToInt64(objReq.tutorId);
                    db.tblSessions.InsertOnSubmit(sessionObj);
                    db.SubmitChanges();
                    return true;
                }
                catch (Exception)
                {
                    return false;
                    
                }
            }

            
        }
        internal bool CreateSession(StartSessionModel objReq)
        {
            using (var db = new WizzDataContext())
            {
                try
                {
                    // var uniqueRequestData = db.tblStudentRequests.Where(x => x.fkUserId == Convert.ToInt64(objReq.userId) && x.isDelete == false).FirstOrDefault();
                    tblSession sessionObj = new tblSession();
                    sessionObj.createdDate = DateTime.UtcNow;
                    sessionObj.fromTime = timeConversionMethod(objReq.fromTime);
                    sessionObj.toTime = timeConversionMethod(objReq.toTime);
                    sessionObj.uniqueRequestId = objReq.uniqueRequestId;
                    sessionObj.dayType = Convert.ToInt16(objReq.dayType);
                    sessionObj.isDelete = false;
                    sessionObj.updatedDate = DateTime.UtcNow;
                    sessionObj.studentId = Convert.ToInt64(objReq.userId);
                    sessionObj.tutorId = Convert.ToInt64(objReq.tutorId);
                    sessionObj.isCancelled = false;
                    sessionObj.isComplete = false;
                    sessionObj.homeWork = "";
                    sessionObj.homeWorkDueDate = "";
                    sessionObj.isActive = true;
                    sessionObj.isStarted = false;
                    sessionObj.sessionAmount = "0";
                    sessionObj.sessionNotes = "";


                    db.tblSessions.InsertOnSubmit(sessionObj);
                    db.SubmitChanges();
                    return true;
                }
                catch (Exception)
                {
                    return false;

                }
            }


        }