private async Task HandleSave(IStore <RootState> store, VstsProjectViewModel project) { var organization = store?.State?.Settings?.Organizations.Where(o => o.Id == project.Organization).FirstOrDefault(); var identity = store?.State?.Settings?.Identities.Where(i => i.Id == organization.Identity).FirstOrDefault(); project.Identity = identity.Id; await store.Dispatch <SaveProject, VstsProjectViewModel>(project); }
private async Task HandleDelete(IStore <RootState> store, VstsProjectViewModel project) { await store.Dispatch <DeleteProject, VstsProjectViewModel>(project); }
public Task Save(VstsProjectViewModel model) { return(_mediator.Execute(new SaveProject { Project = model })); }