public void Contains_Test() { var itemPath = userContext.Dispatcher.Invoke(() => userContext.Random().Path); var contains = userContext.Dispatcher.Invoke(() => userContext.Contains(itemPath)); Assert.IsTrue(contains); }
public IActionResult PutUser(long id, UserDto userDto) { if (id != userDto.Id) { return(BadRequest()); } _context.SetEntryState(userDto, EntityState.Modified); try { _context.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!_context.Contains(id)) { return(NotFound()); } else { throw; } } return(Ok()); }
public static Task <bool> ContainsAsync(this IUserContext userContext, string itemPath) { return(userContext.Dispatcher.InvokeAsync(() => userContext.Contains(itemPath))); }
public void Contains() { userContext.Contains(PathUtility.Separator); }