public IHttpActionResult Post([FromBody] Karen karen) { do { karen.id = this.NextKarenId; }while (karens.ContainsKey(karen.id)); karens.Add(karen.id, karen); return(this.Json(karen)); }
private void Awake() { if (instance == null) { instance = this; } else { Destroy(gameObject); } DontDestroyOnLoad(gameObject); }
public IHttpActionResult Put(int id, [FromBody] Karen karen) { karen.id = id; karens[id] = karen; return(this.Json(karen)); }