public IActionResult Post(int sid, int cid) { if (checkValue(sid, cid)) { if (_dbstore.FindEnrolment(sid, cid)) { return(BadRequest("Enrolment already exists!")); } _dbstore.AddEnrolment(sid, cid); return(Ok()); } return(NotFound()); }