/// <summary> /// 添加列表中的数据模型到数据中 /// </summary> /// <param name="list_obs"></param> /// <returns></returns> public int Add(ModelList_obs list_obs) { foreach (var tem in list_obs) { DbTab.Add(tem); } return(Db.SaveChanges()); }
/// <summary> /// 添加一个数据模型到列表 /// </summary> /// <param name="model">数据模型</param> /// <param name="list_obs">列表</param> public void Add(TEntity model, ModelList_obs list_obs) { list_obs.Add(model); }