Exemplo n.º 1
0
        public async Task <Series> CreateSeries(string seriesName, File file = null)
        {
            File createdFile = null;

            if (file != null)
            {
                createdFile = await _fileAccessor.Insert(file);
            }
            return(await _seriesAccessor.Insert(new Series
            {
                SeriesName = seriesName,
                File = createdFile,
                FileId = createdFile?.Id
            }));
        }
Exemplo n.º 2
0
        public async Task <Mission> Create(string missionName, string seriesId, File file = null)
        {
            File createdFile = null;

            if (file != null)
            {
                createdFile = await _fileAccessor.Insert(file);
            }
            return(await _missionAccessor.Insert(new Mission
            {
                MissionName = missionName,
                SeriesId = seriesId,
                File = createdFile,
                FileId = createdFile?.Id
            }));
        }