Esempio n. 1
0
        public ParentsViewModel()
        {
            deleteCommand = new DeleteParentCommand(this);
            updateCommand = new UpdateParentCommand(this);
            addCommand    = new AddParentCommand(this);
            //saveCommand = new SaveCommand(this);

            parentsList = new ObservableCollection <ParentModel>
            {
                ////new ParentModel{IDParent = "1",FirstName = "Joe", LastName = "Doe"},
                ////new ParentModel{IDParent = "2",FirstName = "Jof", LastName = "Boe"}
            };
            DataGrid_Loaded();
        }
 public async Task <IActionResult> Update(UpdateParentCommand command)
 => await SendAsync(command, resourceId : command.Id, resource : "parent");
Esempio n. 3
0
 public async Task <IActionResult> UpdateParent(UpdateParentCommand command)
 {
     return(Ok(await mediator.Send(command)));
 }