Esempio n. 1
0
        public async Task <StashtabModel> RemoveStashtab(string snapshotId, string stashtabId)
        {
            var snapshot = await _snapshotRepository.GetSnapshots(snapshot => snapshot.ClientId == snapshotId).Include(snapshot => snapshot.StashTabs).FirstAsync();

            var stashtasb = snapshot.StashTabs.FirstOrDefault(snapshot => snapshot.ClientId == snapshotId);

            _snapshotRepository.RemoveStashtab(stashtasb);
            await _snapshotRepository.SaveChangesAsync();

            return(_mapper.Map <StashtabModel>(snapshot));
        }