public async Task <IHttpActionResult> BlockUser(int blockerID, int blockedID) { var user = await db.Users.FirstOrDefaultAsync((u) => u.UserID == blockerID); if (user == null) { return(NotFound()); } var friend = await db.Users.FirstOrDefaultAsync((u) => u.UserID == blockedID); if (friend == null) { return(NotFound()); } await db.BlockAUser(blockerID, blockedID); return(Ok()); }