Ejemplo n.º 1
0
        public static void DefineOrUpdateProgramOption(program_options opt)
        {
            if (opt != null)
            {
                using (zvsEntities2 db = new zvsEntities2(zvsEntityControl.GetzvsConnectionString))
                {
                    program_options existing_option = db.program_options.FirstOrDefault(o => o.name == opt.name);

                    if (existing_option == null)
                    {
                        db.program_options.AddObject(opt);
                    }
                    else
                    {
                        //Update
                        existing_option.name = opt.name;
                        existing_option.value = opt.value;
                    }
                    db.SaveChanges();
                }
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the program_options EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToprogram_options(program_options program_options)
 {
     base.AddObject("program_options", program_options);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Create a new program_options object.
 /// </summary>
 /// <param name="id">Initial value of the id property.</param>
 public static program_options Createprogram_options(global::System.Int64 id)
 {
     program_options program_options = new program_options();
     program_options.id = id;
     return program_options;
 }