public IHttpActionResult GetObjectById(int id) { COMimageObject obj = BLLobject.GetObjectById(id); if (obj == null) { return(BadRequest("object does not exist")); } return(Ok(obj)); }
public IHttpActionResult PostObject([FromBody] COMimageObject obj) { COMimageObject o = BLLobject.GetObjectById(obj.ObjectId); if (o != null) { return(BadRequest("object already exist")); } BLLobject.AddObject(obj); return(Ok()); }