Exemplo n.º 1
0
        public void AddTwit(string text,string name)
        {
            var Repo = container.Resolve<Repositoryt>();
            var query = Repo.UserList();

            foreach (var item in query)
            {
                if (item.Login == name)
                {
                    var twit = new Twit();
                    twit.Data = DateTime.Now;
                    twit.Text = text;
                    twit.User = item;
                    Repo.AddTwit(twit);
                }
            }
        }
Exemplo n.º 2
0
 public void RemoveTwit(Twit twit)
 {
     dbCont.Twits.Remove(twit);
     dbCont.SaveChanges();
 }
Exemplo n.º 3
0
 public void AddTwit(Twit twit)
 {
     dbCont.Twits.Add(twit);
     dbCont.SaveChanges();
 }