Exemple #1
0
        // DELETE api/values/5
        public void Delete(int id)
        {
            if (!CheckTok())
            {
                return;
            }

            Network_Logins logins = this.context.Networks.Find(id);

            this.context.Networks.Remove(logins);
            this.context.SaveChanges();
        }
Exemple #2
0
        // PUT api/values/5
        public void Put(int id, [FromBody] Network_Logins network)
        {
            if (!CheckTok())
            {
                return;
            }


            Network_Logins current = this.context.Networks.Find(id);

            current.Network_Login    = network.Network_Login;
            current.Network_Password = network.Network_Password;
            current.Network_Route    = network.Network_Route;
            current.Destinations_ID  = network.Destinations_ID;
            this.context.SaveChanges();
        }
Exemple #3
0
 // POST api/values
 public void Post([FromBody] Network_Logins network)
 {
     this.context.Networks.Add(network);
     this.context.SaveChanges();
 }