public SkillEffectName insertSkillEffectName(string name, string heroName, string skillName, 
            List<string> skillEffectValues, string skillDescription)
        {
            SkillEffectName skillEffectName = new SkillEffectName();

            Skill skill = SkillCreator.SelectByName(skillName);

            skillEffectName.Name = name.Trim();

            

            skillEffectName = checkIfSkillNameExists(name, skill, skillDescription);

            if (skillEffectName == null)
            {
                using (Dota2Entities ctx = new Dota2Entities())
                {
                    try
                    {
                        skillEffectName = ctx.SkillEffectName.Add(skillEffectName);
                        ctx.SaveChanges();
                        Console.WriteLine("Skill " + name + " Created");
                    }
                    catch (Exception e)
                    {
                        throw e;
                    }
                }
            }
            return skillEffectName;
        }
 /// <summary>
 /// Checks if the description of the skill exists
 /// </summary>
 protected SkillEffectName checkIfSkillNameExists(string name, string heroName, string skillId)
 {
     SkillEffectName skillEffectName = new SkillEffectName();
     using(Dota2Entities ctx = new Dota2Entities())
     {
         //get SkillId
         
         
         //if (skill != null)
         //{
         //    try
         //    {
         //        if (ctx.SkillEffectName.Any(x =>
         //                                    x.Name == name &&
         //                                    x.Skill.Hero.Name == heroName))
         //        {
         //            Console.WriteLine("Skill " + name + " Already exists...");
         //            return true;
         //        }
         //        else
         //        {
         //            return null;
         //        }
         //    }
         //    catch (Exception e)
         //    {
         //        //TODO implementar log de erro
         //        throw e;
         //    }
         //}
         
     }
 }
 /// <summary>
 /// Checks if the description of the skill exists
 /// </summary>
 protected SkillEffectName checkIfSkillNameExists(string name, Skill skill, string skillDescription)
 {
     SkillEffectName skillEffectName = new SkillEffectName();
     using (Dota2Entities ctx = new Dota2Entities())
     {
         try
         {
             skillEffectName = ctx.SkillEffectName.Where(x =>
                                                         x.Name == name &&
                                                         x.Skill.Hero.Name == skill.Hero.Name &&
                                                         skillDescription == skill.Description).First();
             if(skillEffectName.ID != null)
             {
                 Console.WriteLine("Skill " + name + " Already exists...");
                 return skillEffectName;
             }
             else
             {
                 return null;   
             }
         }
         catch (Exception e)
         {
             //TODO implementar log de erro
             throw e;
         }                
     }
 }
        /// <summary>
        /// Checks if the description of the skill exists
        /// </summary>
        protected SkillEffectName checkIfSkillNameExists(string name, string heroName, string skillName)
        {
            SkillEffectName skillEffectName = new SkillEffectName();
            using (Dota2Entities ctx = new Dota2Entities())
            {
                //get SkillId
                SkillCreator.SelectByName(skillName)

                if (skill != null)
                {
                    try
                    {
                        if (ctx.SkillEffectName.Any(x =>
                                                    x.Name == name &&
                                                    x.Skill.Hero.Name == heroName))
                        {
                            Console.WriteLine("Skill " + name + " Already exists...");
                            return true;
                        }
                        else
                        {
                            return null;
                        }
                    }
                    catch (Exception e)
                    {
                        //TODO implementar log de erro
                        throw e;
                    }
                }

            }
        }
        /// <summary>
        /// Checks if the description of the skill exists
        /// </summary>
        protected SkillEffectName checkIfSkillNameExists(string name, Skill skill, string skillDescription)
        {
            SkillEffectName skillEffectName = new SkillEffectName();
            using (Dota2Entities ctx = new Dota2Entities())
            {
                try
                {
                    ctx.Configuration.LazyLoadingEnabled = true;

                    if(ctx.SkillEffectName.Any(s => s.Name == name))
                    {
                    skillEffectName = ctx.SkillEffectName.Where(x =>
                                                                x.Name == name).First();


                    skillEffectName = ctx.SkillEffectName.Where(x =>
                                                                x.Name == name &&
                                                                x.Skill.Hero.Name == skill.Hero.Name &&
                                                                skillDescription == skill.Description).First();
                    
                        Console.WriteLine("Skill " + name + " Already exists...");
                        return skillEffectName;
                    }
                    else
                    {
                        return null;   
                    }
                }
                catch (Exception e)
                {
                    //TODO implementar log de erro
                    throw e;
                }                
            }
        }
        /// <summary>
        /// Checks if the description of the skill exists, in negative case call the insertSkillDesc
        /// </summary>
        public SkillEffectName checkIfSkillNameExists(string name)
        {
            SkillEffectName skillEffectName = new SkillEffectName();
            using(Dota2Entities ctx = new Dota2Entities())
            {
                try
                {
                    if (ctx.SkillEffectName.Any(x => x.Name == name))
                    {
                        Console.WriteLine("Skill " + name + " Already exists...");
                    }
                    else
                    {
                        skillEffectName = insertSkillEffectName(name);
                    }
                }
                catch (Exception e)
                {
                    //TODO implementar log de erro
                    throw e;
                }
            }

            return skillEffectName;
        }
        /// <summary>
        /// Checks if the description of the skill exists
        /// </summary>
        protected bool checkIfSkillNameExists(string name, Skill skill, string skillDescription, out SkillEffectName skillEffectName)
        {
            using (Dota2Entities ctx = new Dota2Entities())
            {
                skillEffectName = new SkillEffectName();

                try
                {
                    skill = ctx.Skill.Include("Hero").Where(x => x.ID == skill.ID).First();

                    var result = from s in ctx.SkillEffectName
                                 where s.Name == name
                                    && s.SkillId == skill.ID
                                    && s.Skill.Hero.Name == skill.Hero.Name
                                    && s.Skill.Description == skill.Description
                                 select s;

                    if (result.Count() == 1)
                    {
                        Console.WriteLine(result.First().ID +  " Skill " + name + " Already exists..." );
                        skillEffectName = result.First();
                        return true;
                    }
                    else if (result.Count() > 1)
                    {
                        //TODO Create log
                        throw new Exception("More than 1 skillEffectname returned. Check this");
                    }
                    else
                    {
                        return false;
                    }
                }
                catch (Exception e)
                {
                    //TODO implementar log de erro
                    throw e;
                }                
            }
        }
        /// <summary>
        /// Checks if the description of the skill exists
        /// </summary>
        protected SkillEffectName checkIfSkillNameExists(string name, Skill skill, string skillDescription)
        {
            SkillEffectName skillEffectName = new SkillEffectName();
            

            using (Dota2Entities ctx = new Dota2Entities())
            {
                try
                {
                    ctx.Configuration.LazyLoadingEnabled = false;

                    var result = from s in ctx.SkillEffectName
                                 where s.SkillId == skill.ID
                                    && s.Skill.Hero.Name == skill.Hero.Name
                                    && s.Skill.Description == skill.Description
                                 select s;
                    
                    if(result.Count() == 0)
                    {
                        Console.WriteLine("Skill " + name + " Already exists...");
                        return result.First();
                    }
                    else if(result.Count() > 1)
                    {
                        //TODO Create log
                        throw new Exception("More than 1 skilleffectname returned. Check this");
                    }
                    else
                    {
                        return null;   
                    }
                }
                catch (Exception e)
                {
                    //TODO implementar log de erro
                    throw e;
                }                
            }
        }
        public SkillEffectName insertSkillEffectName(string name)
        {
            SkillEffectName skillEffectName = new SkillEffectName();

            skillEffectName.Name = name.Trim();

            using(Dota2Entities ctx = new Dota2Entities())
            {
                try
                {
                    skillEffectName = ctx.SkillEffectName.Add(skillEffectName);
                    ctx.SaveChanges();
                    Console.WriteLine("Skill " + name + " Created");
                }
                catch (Exception e)
                {
                    throw e;
                }
            }

            return skillEffectName;
        }
        protected SkillEffectName prepareSkillEffectName(SkillEffectName skillEffectName)
        {
            

            return skillEffectName
        }