Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public async Task<bool> UpdateSituation(int id, SituationsDto data)
- {
- Situations result = _mapper.Map<SituationsDto, Situations>(data);
- result.Deleted = true;
- _context.Entry(result).State = EntityState.Modified;
- await _context.SaveChangesAsync();
- SituationCategories situationCategory = new SituationCategories();
- if (result.SituationCategory != null)
- {
- if (situationCategory != null)
- {
- situationCategory.Description = result.SituationCategory.Description;
- }
- }
- await _context.SaveChangesAsync();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement