public async Task <T> FindProductByIdAsync(int id) { using (var dbContext = new TheStoreContext()) { return(await dbContext.FindAsync <T>(id)); } }
public async Task <User> FindUserByIdAsync(int id) { using (var dbContext = new TheStoreContext()) { return(await dbContext.FindAsync <User>(id)); } }