public async Task <ActionResult <Actor> > Get(int id) { if (await actorLogic.FindByIdAsync(id) == null) { return(NotFound()); } return(Ok(await actorLogic.FindByIdAsync(id))); }
public async Task FindByIdAsyncTest(int actorId, bool expectedFound) { var actor = await actorLogic.FindByIdAsync(actorId); if (expectedFound) { Assert.NotNull(actor); Assert.Equal(actorId, actor.ActorId); } else { Assert.Null(actor); } }