public ActionResult Index() { var context = new CQRSExampleEntities(); ViewBag.ActiveCustomers = (from x in context.Customers where x.IsBlacklisted == false select x).ToList(); ViewBag.BlacklistedCustomers = (from x in context.Customers where x.IsBlacklisted == true select x).ToList(); return(View()); }
/* * private void button1_Click(object sender, EventArgs e) * { * _bus.Send(new CreateCustomer(Guid.NewGuid(), textBox1.Text, textBox2.Text)); * } */ private void Form1_Load(object sender, EventArgs e) { var context = new CQRSExampleEntities(); dataGridView1.DataSource = new BindingList <Customer>((from x in context.Customers select x).ToList()); }
public CustomerEmailUnblacklistedHandler(CQRSExampleEntities context) { _context = context; }
public CustomerEmailAddressChangedHandler(CQRSExampleEntities context) { _context = context; }
public CustomerNameChangedHandler(CQRSExampleEntities context) { _context = context; }
public CustomerCreatedHandler(CQRSExampleEntities context) { _context = context; }