public async Task <IHttpActionResult> DeleteMessage(int requesterID, int messageID) { var sender = await db.Users.FirstOrDefaultAsync((u) => u.UserID == requesterID); if (sender == null) { return(NotFound()); } var message = await db.Messages.FirstOrDefaultAsync((m) => m.MessageID == messageID); if (message == null) { return(NotFound()); } await db.DeleteMessage(requesterID, messageID); return(Ok()); }