public void AddUserToProjectParticipants(string username, int id) { if (projectDal.GetProjectEntity(id).Manager != username) { projectDal.AddUserToProjectParticipants(username, id); } else { throw new Exception("the user cant be added as a participant because the user is a manager"); } }