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