Ejemplo n.º 1
0
        private void Save()
        {
            SetType();

            ResetDates();

            if (_id == Guid.Empty)
            {
                _vacationService.CreateVacationAsync(Vacation);
            }
            else
            {
                _vacationService.UpdateVacationAsync(Vacation);
            }
        }
Ejemplo n.º 2
0
        private static void StoresVacationInTheDbAndUploadstoTheServer()
        {
            var id = Guid.NewGuid();

            var newVacation = GenerateNewVacation(id);

            _serviceSql.CreateVacation(newVacation);

            _serviceApi.CreateVacationAsync(newVacation);

            _vacations = _serviceApi.GetVacationAsync().Result;

            ShowVacationsDto(_vacations, "List of vacations requests from the server after adding the new vacation.");

            _vacations = _serviceSql.GetVacation().ToList();

            ShowVacationsDto(_vacations, "List of vacations from the db after after adding the new vacation.");
        }