public async Task <int> UpdateGenericPage(int id, GenericPageDto genDto, CancellationToken cancellationToken) { int ReturnId = 0; var model = await _repo.GetGenericPageById(id, cancellationToken); if (model != null) { _mapper.Map(genDto, model); model.ModifiedBy = genDto.CreatedBy; model.ModifiedDate = DateTime.Now; await _repo.UpdateGenericPage(model, cancellationToken).ConfigureAwait(false); ReturnId = 1; } return(ReturnId); }