예제 #1
0
        public async Task CreateAndOpenDatabase()
        {
            var maybeFileName = await _applicationInteraction.ShowSaveFileDialog("New Database");

            if (maybeFileName.HasNoValue)
            {
                return;
            }

            using (var stream = new FileStream(maybeFileName.Value, System.IO.FileMode.Create))
            {
                LiteEngine.CreateDatabase(stream);
            }

            await OpenDatabase(maybeFileName.Value).ConfigureAwait(false);
        }