示例#1
0
        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());
        }
示例#2
0
        /*
         * 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());
        }
示例#3
0
 public CustomerEmailUnblacklistedHandler(CQRSExampleEntities context)
 {
     _context = context;
 }
示例#4
0
 public CustomerEmailAddressChangedHandler(CQRSExampleEntities context)
 {
     _context = context;
 }
示例#5
0
 public CustomerNameChangedHandler(CQRSExampleEntities context)
 {
     _context = context;
 }
示例#6
0
 public CustomerCreatedHandler(CQRSExampleEntities context)
 {
     _context = context;
 }