コード例 #1
0
        public async Task <IActionResult> GetEstate(EstateViewModel viewModel,
                                                    CancellationToken cancellationToken)
        {
            // TODO: Update the estate information

            return(this.View("EstateDetails", viewModel));
        }
コード例 #2
0
 public async Task Create(EstateViewModel model)
 {
     await _bus.Dispatch(new CreateEstateCommand
     {
         Address   = model.Address,
         Area      = model.Area,
         Direction = model.Direction,
         Name      = model.Name,
         OwnerId   = model.OwnerId
     });
 }
コード例 #3
0
        /// <summary>
        /// Converts from.
        /// </summary>
        /// <param name="estateModel">The estate model.</param>
        /// <returns></returns>
        /// <exception cref="ArgumentNullException">estateModel</exception>
        public EstateViewModel ConvertFrom(EstateModel estateModel)
        {
            if (estateModel == null)
            {
                throw new ArgumentNullException(nameof(estateModel));
            }

            EstateViewModel viewModel = new EstateViewModel
            {
                EstateName = estateModel.EstateName,
                EstateId   = estateModel.EstateId
            };

            return(viewModel);
        }
コード例 #4
0
 public EstatePage()
 {
     DataContext = new EstateViewModel();
     InitializeComponent();
 }
コード例 #5
0
 public async Task Put(EstateViewModel model)
 {
     await _service.Update(model);
 }
コード例 #6
0
 public async Task Post(EstateViewModel model)
 {
     await _service.Create(model);
 }