@page "/accounts" @using SqliteWasmHelper @using BlazorWasmExample.Data @using Microsoft.EntityFrameworkCore @inject ISqliteWasmDbContextFactory Factory Accounts

Accounts

Assigned Company Names

    @foreach (var account in accounts) { @account.AccountName
    Boolvalue: @accountboxvalue
    }

Tasks

{ @foreach (var tasks in accounts) {
  • @tasks.Tasks
  • } }
      @foreach (var task in ) {
    • @task.TaskName
    • }
    @code { public string? TaskNote; private string? newAccount; private List accounts = new List(); private Dictionary tasks = new(); private string? newTask; private bool accountboxvalue { get; set; } private void toggle() { accountboxvalue = !accountboxvalue; } private void addAccount() { if (!string.IsNullOrWhiteSpace(newAccount)) { Account accounts = new Account(AccountName, tasks, LastContacted); accounts.Add(accounts); Account newAccount = new Account{newAccount}; accounts.Add(new Account { AccountName = newAccount }); newAccount = string.Empty; } } private void addTask() { { if (!string.IsNullOrWhiteSpace(newTask)) { if (Account.Equals(accountboxvalue)); { tasks.Add(newTask, ""); newTask = string.Empty; } } } } }