private async Task Add(BillboardViewModel billboardViewModel)
        {
            byte[] array = new byte[billboardViewModel.File.InputStream.Length];

            var r1 = await billboardViewModel.File.InputStream.ReadAsync(array, 0, array.Length);

            var billboard = new Billboards.Common.Models.Billboard() { Description = billboardViewModel.Description, Stream = array };

            _billboardsService.Add(billboard);
        }
Esempio n. 2
0
        private async Task Add(BillboardViewModel billboardViewModel)
        {
            byte[] array = new byte[billboardViewModel.File.InputStream.Length];

            var r1 = await billboardViewModel.File.InputStream.ReadAsync(array, 0, array.Length);

            var billboard = new Billboards.Common.Models.Billboard()
            {
                Description = billboardViewModel.Description, Stream = array
            };

            _billboardsService.Add(billboard);
        }