Exemplo n.º 1
0
        /// <summary>
        /// 创建XmlConfig
        /// </summary>
        /// <param name="configType"></param>
        /// <param name="xmlContent"></param>
        /// <returns></returns>
        public static XmlConfig CreateXmlConfig(string configType, XElement xmlContent)
        {
            var newXmlConfig = new XmlConfig()
            {
                ConfigType = configType,
                XmlContent = xmlContent,
            };
            newXmlConfig.GenerateNewIdentity();

            return newXmlConfig;
        }
Exemplo n.º 2
0
 //更新XmlConfig数据到XmlConfig集合
 public void UpdateXmlConfig(XmlConfig currentXmlConfig)
 {
     //  _service.Update<XmlConfig>(currentXmlConfig);
     _context.Entry(currentXmlConfig).State = EntityState.Modified;
 }
Exemplo n.º 3
0
 //增加XmlConfig数据到XmlConfig集合
 public void AddXmlConfig(XmlConfig currentXmlConfig)
 {
     _context.XmlConfigs.Add(currentXmlConfig);
 }