Am trying to update records and save changes to the database and it seems as i can't because i cannot get my list. sorry if my question is not clear.
Let me know if there's other way i can do it.
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();
}
Am getting this error:
Cannot convert from
System.Collections.Generic.List<ClaimHistoryModel.ClientLog>
toSystem.Collections.Generic.IEnumerable<claimAudit>