Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9315333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T02:20:16+00:00 2026-06-19T02:20:16+00:00

Before post this question i try search based on my problem i couldn’t find

  • 0

Before post this question i try search based on my problem i couldn’t find one (may be am not search that well :(, i was trying to convert my string to integer in the linq query i got this exception.

**

LINQ to Entities does not recognize the method ‘Int32
ToInt32(System.String)’ method, and this method cannot be translated
into a store expression

**

Posting full query might be time wasting for you guys so i just dropped the main line where i get stuck

 int intBookingNumber = Convert.ToInt32(Booktime);
    var query =
               (from PROJECTS in db.PROJECTS
                join WOes in db.WOes on PROJECTS.PRJ_ID equals WOes.PRJ_ID
                join SEVTs in db.SEVTs on WOes.SEQNUM equals SEVTs.SEQNUM
                join RSRCEs in db.RSRCEs on SEVTs.RESID equals RSRCEs.RESID
                join PERS in db.PERS on RSRCEs.RECID equals PERS.RECID into PERS_join
                from PERS in PERS_join.DefaultIfEmpty()
                join RESTYPEs in db.RESTYPEs on new { RTYPE = SEVTs.RTYPE } equals new { RTYPE = RESTYPEs.CODE }
                join RESCATs in db.RESCATs on new { RCAT = SEVTs.RCAT } equals new { RCAT = RESCATs.CODE }
                join SEVT_EX in db.SEVT_EX on SEVTs.SESID equals SEVT_EX.SESID into SEVT_EX_join
                from SEVT_EX in SEVT_EX_join.DefaultIfEmpty()
                where
                  (new string[] { "1", "2" }).Contains((PROJECTS.STAT.TrimEnd()).TrimStart()) &&
                  (WOes.STAT.TrimEnd()).TrimStart() == "6" &&
                  ((SEVTs.RESTYPE == 5 ||
                  SEVTs.RESTYPE == 0) &&
                  (RESTYPEs.USER2.Substring(2 - 1, 1) == "F" &&
                  RESTYPEs.USER2.Substring(6 - 1, 1) == "S") &&
                  SEVTs.TYPE == 0) ||
                  (SEVTs.RESTYPE == 4 &&
                  SEVTs.TYPE == 0) &&
                  RESCATs.GROUPID==0 &&
                  RESTYPEs.GROUPID==0 &&
                  (int?)(WOes.INVOICE.TrimStart()).Length > 0 &&
                  WOes.INVOICE.TrimStart() != "PENDING" &&
                  WOes.USERFLAG1 != 1 &&
                //(SEVTs.T_START.TrimStart()) == (Booktime)
                 //Convert.ToInt32(SEVTs.T_START.TrimStart()) >= Convert.ToInt32(Booktime)
                 Convert.ToInt32(SEVTs.T_START) >= intBookingNumber
                orderby
                 PROJECTS.PRJ_ID,
                 WOes.WONUM
                select new
                {
                    PROJECTS.PRJ_ID,
                    PROJECTS.USER3,
                    PROJECTS.USER9,
                    WOes.WONUM,
                    WOes.JOBDESC,
                    SEVTs.SESID,
                    SEVTs.RESTYPE,
                    SEVTs.TYPE,
                    SEVTs.T_START,
                    SEVTs.T_END,
                    SEVTs.MEALEND,
                    SEVTs.MELSTART3,
                    SEVTs.MELSTART2,
                    SEVTs.MELEND2,
                    Column1 = SEVTs.MELSTART2,
                    SEVTs.MELEND3,
                    SEVTs.USER2,
                    SEVTs.SUBACTID,
                    SEVTs.OT_EXEMPT,
                    USER5 = SEVT_EX.USER5,
                    SEVTs.GMT_OFFSET,
                    SEVTs.MEALSTART,
                    SEVTs.STANDARD,
                    RESCATs.USER1,
                    SEVTs.RESID
                });

SEVTs.T_START.TrimStart() and bookingStart both data types are string. Obviously they are getting numbers here . how can i use the logic operator here.

Any help much appreciated.

Find the work around guys, this help me to solve my problem

 **String.Compare(SEVTs.T_START.TrimStart(), Booktime) >= 0**
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T02:20:17+00:00Added an answer on June 19, 2026 at 2:20 am

    Found the work around guys, this help me to solve my problem

     **String.Compare(SEVTs.T_START.TrimStart(), Booktime) >= 0**
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am sorry to post question hich was here before, but this is driving
before I start I want to point out that I tagged this question as
Hi this question or problem i have its very hard i have search and
I know this question has been asked before, but I wasn't able to find
Please try to search StackOverflow before asking a question. Many questions are already answered.
I know this type of question has been asked before, but I could not
This is a similar question to those that have been asked before, but still
I already post this question before but people always ask unnecessary question. I'm gonna
I found a similar question in this post , but my problem is different,
Before I get anywhere with this post, let me make this clear, there is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.