Exemple #1
0
        public async Task UpdatePaneDetails(PaneDetailsDTO paneDetailsDto)
        {
            var pane = await _context.PaneDetails.SingleAsync(x => x.PaneId == paneDetailsDto.PaneId);

            pane.Index = paneDetailsDto.Index;
            pane.Size  = paneDetailsDto.Size;
            await _context.SaveChangesAsync();
        }
Exemple #2
0
        public async Task <int> AddNewPaneDetails(PaneDetailsDTO paneDetailsDto)
        {
            var paneDetails = _mapper.Map <PaneDetail>(paneDetailsDto);

            _context.PaneDetails.Add(paneDetails);
            await _context.SaveChangesAsync();

            return(_context.PaneDetails.OrderBy(e => e.PaneId).Last().PaneId);
        }