Home rj_sami21 Activity

rj_sami21

About

Username
rj_sami21
Joined
Visits
4
Last Active
Roles
Member

Activity

  • rj_sami21

    Hello everyone,

    I'm currently trying to execute some SQL UPDATE (Oracle) using EF core ExecuteSqlRawAsync method.
    The problem is that ExecuteSqlRawAsync seems to keep hanging without returning anything. This same piece of code is working fine in the context of our application though.
    Do you have any clue on what may cause this issue? Or is this something that we cannot do with LINQPad?
    I'm using LINQPad 6 btw.

    ...
    var query =  @"UPDATE MyTable SET stuffId = '12344'";
    
            using(var transaction = this.Database.BeginTransaction())
            {
                try
                {
                    var updated = await this.Database.ExecuteSqlRawAsync(query);
                    transaction.Commit();
                    return true;
                }
                catch(Exception ex)
                {
                    transaction.Rollback();
                    return false;
                }
            }
    

    Tank you very much for your help.

    ·
    April 27
    • rj_sami21
      rj_sami21
      My bad! :D
      I forgot that my table schema has changed but my model was not updated to reflect this change.
      It works fine now. :)