Example #1
0
        public async Task <MissionSimpleDto> Create()
        {
            MissionCreateDto Mission = new MissionCreateDto {
                Name = Name, Deadline = Deadline, Description = Description, TotalSum = TotalSum
            };

            MissionCreating = true;
            MissionRepository repository = new MissionRepository();
            MissionSimpleDto  mission    = await repository.CreateForList(Mission);

            (Application.Current.MainPage.BindingContext as MissionListViewModel).Missions.Add(mission);
            MissionCreating = false;
            await CloseModal();

            return(mission);
        }