private void UpdateWhyChoose(string poli, WhyChooseBiz why, DateTime date) { why.content = poli; why.modifiedAt = date; _insendluEntities.Entry(why).State = System.Data.Entity.EntityState.Modified; _insendluEntities.SaveChanges(); }
private int GetProjectWhyChoose(string content, long projId) { var why = new WhyChooseBiz { content = content, createdAt = DateTime.Now, modifiedAt = DateTime.Now, proj_id = (int)projId }; _insendluEntities.WhyChooseBizs.Add(why); TryCatch(); return((int)why.id); }