Esempio n. 1
0
        private CreateDinnerCommand GetCreateDinnerCommand(Dinner dinner)
        {
            var createDinnerCommand = new CreateDinnerCommand();

            UpdateModel(createDinnerCommand);
            var nerd     = (NerdIdentity)User.Identity;
            var dinnerId = Guid.NewGuid();

            createDinnerCommand.Host = new DinnerHost {
                HostedById = nerd.UserId, HostedBy = nerd.FriendlyName
            };
            createDinnerCommand.Location = new Location {
                Address = dinner.Address, Country = dinner.Country, Latitude = dinner.Latitude, Longitude = dinner.Longitude
            };
            createDinnerCommand.DinnerId = dinnerId;
            return(createDinnerCommand);
        }
Esempio n. 2
0
 public CreateDinnerStatus CreateDinner(CreateDinnerCommand createDinnerCommand)
 {
     return((CreateDinnerStatus)commandBus.Execute(createDinnerCommand));
 }