Example #1
0
        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));
        }
Example #2
0
    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else
        {
            Destroy(gameObject);
        }



        DontDestroyOnLoad(gameObject);
    }
Example #3
0
 public IHttpActionResult Put(int id, [FromBody] Karen karen)
 {
     karen.id   = id;
     karens[id] = karen;
     return(this.Json(karen));
 }