/// <summary> /// Create a new remag_municipio object. /// </summary> /// <param name="municipio_id">Initial value of the municipio_id property.</param> /// <param name="nome">Initial value of the nome property.</param> /// <param name="uf">Initial value of the uf property.</param> public static remag_municipio Createremag_municipio(global::System.Int32 municipio_id, global::System.String nome, global::System.String uf) { remag_municipio remag_municipio = new remag_municipio(); remag_municipio.municipio_id = municipio_id; remag_municipio.nome = nome; remag_municipio.uf = uf; return remag_municipio; }
/// <summary> /// Deprecated Method for adding a new object to the remag_municipio EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToremag_municipio(remag_municipio remag_municipio) { base.AddObject("remag_municipio", remag_municipio); }
private void ImportarMunicipio(DataEntities dataContext,List<string> linhas) { linhas = linhas.Where(l=>l.StartsWith("Municipio|")).ToList(); int i = 0; foreach (string linha in linhas) { string[] fields = linha.Split('|'); remag_municipio municipio = new remag_municipio(); municipio.nome = fields[1]; municipio.uf = fields[2]; dataContext.AddToremag_municipio(municipio); backgroundWorker1.ReportProgress(i++); } }