private void StoreNut(string nut, NutInfo info, bool authorized, HttpContext arg4) { if (authorized) { AuthorizedNutList.Add(nut, info); } else { NutList.Add(nut, info); } }
public async Task StoreNut(string nut, NutInfo info, bool authorized, HttpContext context) { var _database = context.RequestServices.GetRequiredService <DatabaseContext>(); await _database.Nuts.AddAsync(new NutInfoData() { Nut = nut, Authorized = authorized, CreatedDate = info.CreatedDate, FirstNut = info.FirstNut, Idk = info.Idk, IpAddress = info.IpAddress }); await _database.SaveChangesAsync(); }