Exemplo n.º 1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Opinion EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToOpinion(Opinion opinion)
 {
     base.AddObject("Opinion", opinion);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Create a new Opinion object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="masterAgentIp">Initial value of the MasterAgentIp property.</param>
 /// <param name="hosts">Initial value of the Hosts property.</param>
 /// <param name="syndrom">Initial value of the Syndrom property.</param>
 public static Opinion CreateOpinion(global::System.Int32 id, global::System.String masterAgentIp, global::System.String hosts, global::System.String syndrom)
 {
     Opinion opinion = new Opinion();
     opinion.Id = id;
     opinion.MasterAgentIp = masterAgentIp;
     opinion.Hosts = hosts;
     opinion.Syndrom = syndrom;
     return opinion;
 }
Exemplo n.º 3
0
        public void InsertSyndromModel(SyndromModel syndromModel)
        {
            if(syndromModel.Hosts == "[Brak]")
                return;

            var syndromDB = new SectionsEntities();

            var opinion = new Opinion
                {
                    Id = syndromDB.Opinion.NextId(v => v.Id),
                    Hosts = syndromModel.Hosts,
                    MasterAgentIp = syndromModel.MasterAgentIp,
                    Syndrom = syndromModel.Syndrom
                };
            syndromDB.AddToOpinion(opinion);
            syndromDB.SaveChanges();
        }