Esempio n. 1
0
        // PUT: api/F/5
        public void Put(int id, UserToFonte value)
        {
            string query = String.Format("update Fonti set TitoloGiornale='{0}', LinkFonte='{1}' where id={2}",
               value.Titolo, value.URL, value.ID);

            p.Insert(query);
        }
Esempio n. 2
0
 // POST: api/F
 public int Post(UserToFonte value)
 {
     string query = "insert into Fonti([User], LinkFonte, TitoloGiornale, UserId) values('" + value.User + "', '" + value.URL.Trim() + "', '" + value.Titolo.TrimEnd() + "', '" + value.UserId + "' )";
     return p.Insert(query);
 }