-1

レコードを更新して変更をデータベースに保存しようとしていますが、リストを取得できないためできないようです。私の質問が明確でない場合は申し訳ありません。

他にできる方法があれば教えてください。

List<ClaimHistoryModel.ClientLog> ClaimLogs = new    List<ClaimHistoryModel.ClientLog>();
using (SidDbContext db = new SidDbContext())
    {
        var oldClaim = db.Client.FirstOrDefault(x => x.ClaimId == clientModel.ClaimId);

        oldClaim.CellNumber = clientModel.CellNumber;

        ClaimLogs = GetClaimLog(db); //here am getting a method which update the Logtbl.(all the changes will be saved) no error on this funstion
      //it works if i save changes here but it won't update the history table which shows the fieds before and after.            
       db.claimAudit.AddRange(ClaimLogs ); Error here
       db.SaveChanges();
    }

このエラーが発生しています:

System.Collections.Generic.List<ClaimHistoryModel.ClientLog>からに変換できませんSystem.Collections.Generic.IEnumerable<claimAudit>

4

1 に答える 1