/// <summary> /// 新增 /// </summary> /// <param name="model"></param> /// <returns></returns> public string Add(V_xy_sp_userspiritpackage model) { if (model == null) { return(string.Empty); } using (xy_sp_userspiritpackageDAL dal = new xy_sp_userspiritpackageDAL()){ xy_sp_userspiritpackage entity = ModelToEntity(model); entity.SpiritPackageID = string.IsNullOrEmpty(model.SpiritPackageID) ? Guid.NewGuid().ToString("N") : model.SpiritPackageID; return(dal.Add(entity)); } }