Example #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);
                }
            }
        }
Example #2
0
 public void RemoveTwit(Twit twit)
 {
     dbCont.Twits.Remove(twit);
     dbCont.SaveChanges();
 }
Example #3
0
 public void AddTwit(Twit twit)
 {
     dbCont.Twits.Add(twit);
     dbCont.SaveChanges();
 }