public void UpdateThink(ThinkModel t) { Think th = db.Thinks.GetItem(t.ThinkId); th.Title = t.Title; th.Content = t.Content; th.Date_of_creation = t.Date_of_creation; // th.UserId = t.UserId; // th.User = t.User; Save(); }
public void CreateThink(ThinkModel t) { db.Thinks.Create(new Think() { Title = t.Title, Content = t.Content, Date_of_creation = t.Date_of_creation, // UserId = t.UserId, // User = t.User }); Save(); }