public async Task MakeMailAsReadByMatcher(long[] ids) { var lstMails = new List <Email>(); Array.ForEach(ids, p => lstMails.Add(new Email { Id = p })); _db.Emails.AttachRange(lstMails); foreach (var mail in lstMails) { mail.ReadByMatcher = true; } await _db.SaveChangesAsync(); }
public async Task <int> SaveAsync() { return(await _dbContext.SaveChangesAsync()); }