<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6826107792545068333</id><updated>2024-10-07T03:31:22.125-03:00</updated><category term=".NET"/><category term="Web"/><category term="Microsoft"/><category term="Visual Studio"/><category term="Front End"/><category term="Windows"/><category term="C#"/><category term="HTML"/><category term="Javascript"/><category term="ASP.NET"/><category term="JQuery"/><category term="Banco de Dados"/><category term="Console"/><category term="MVC"/><category term="Browser"/><category term="Developer Tools"/><category term="F12"/><category term="IIS"/><category term="Integração"/><category term="SQL"/><category term="SQL Server"/><category term="WCF"/><category term="Config"/><category term="Excel"/><category term="IE"/><category term="Interop"/><category term="Password"/><category term="Remove"/><category term="Testes"/><category term="Window"/><category term="Windows Forms"/><title type='text'>A .Net Talk</title><subtitle type='html'>Tecnologias Microsoft, C#, ASP.NET, WCF, IIS, JavaScript e muito mais!</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://adotnettalk.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://adotnettalk.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>20</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6826107792545068333.post-8163362665849717723</id><published>2015-07-23T00:00:00.001-03:00</published><updated>2015-07-23T00:00:00.078-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Front End"/><category scheme="http://www.blogger.com/atom/ns#" term="Microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><category scheme="http://www.blogger.com/atom/ns#" term="Web"/><title type='text'>ASP.NET MVC: EVITE usar HTML Helpers em campos Hidden</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Não sou a favor da cópia/plágio de postagens, porém, esbarrei em um problema recentemente que me custou &amp;nbsp;um bom tempo de pesquisa em busca de uma &quot;resposta&quot; ou justificativa para tal.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Em uma aplicação MVC 4.0, uma view de edição possuía dois formulários (duas tags &quot;&amp;lt;form&amp;gt;&quot;).&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;O ID da model utilizada pela view era armazenado em hiddens criadas a partir do HTML Helper em ambos os formulários.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Notei que após o cadastro da entidade, no retorno do POST da Controller, a model trazia o campo ID preenchido, porém o campo hidden na tela não era preenchido, fazendo com o valor do mesmo ficasse vazio.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Após horas de pesquisa, encontrei em um blog a sugestão de NUNCA utilizar Html Herlpers na criação de campos hidden. Aparentemente não há uma explicação oficial sobre o porque isto ocorre, mas acho interessante disseminar este &lt;strike&gt;pequeno&lt;/strike&gt; inconveniente. Para mais detalhes, acessar o link abaixo:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Fonte: &lt;a href=&quot;http://shivagaadu.blogspot.com.br/2013/03/never-use-html-helpers-for-hidden.html&quot; target=&quot;_blank&quot;&gt;ShivaGaadu&lt;/a&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://adotnettalk.blogspot.com/feeds/8163362665849717723/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://adotnettalk.blogspot.com/2015/07/aspnet-mvc-evite-usar-html-helpers-em.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/8163362665849717723'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/8163362665849717723'/><link rel='alternate' type='text/html' href='http://adotnettalk.blogspot.com/2015/07/aspnet-mvc-evite-usar-html-helpers-em.html' title='ASP.NET MVC: EVITE usar HTML Helpers em campos Hidden'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6826107792545068333.post-3341123309926494826</id><published>2015-07-21T00:00:00.000-03:00</published><updated>2015-07-21T00:00:00.288-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Console"/><category scheme="http://www.blogger.com/atom/ns#" term="Integração"/><category scheme="http://www.blogger.com/atom/ns#" term="Microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>Customização de arquivos BAT : Crie arquivos BAT dinâmicamente </title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgL__9B5o5iA-vUtmlb0tOWFBJN5lyNJYnEdRQpf-IDRozS3sBmiYHvhbta6_ZJN8L5EwKK8JGUWVIkrH_rWPg5R40dFspX__ntZYvZtvTFcqmOKH3WedZw1fyg4cGD6WO6lxc7SiBuFWo/s1600/bat_file.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgL__9B5o5iA-vUtmlb0tOWFBJN5lyNJYnEdRQpf-IDRozS3sBmiYHvhbta6_ZJN8L5EwKK8JGUWVIkrH_rWPg5R40dFspX__ntZYvZtvTFcqmOKH3WedZw1fyg4cGD6WO6lxc7SiBuFWo/s200/bat_file.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Um arquivo BAT é composto por instruções a serem executadas sequencialmente. Sua execução geralmente é agendadas e costuma efetuar tarefas em lote.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Na maioria dos casos, as tarefas são específicas e dificilmente precisam ser alteradas. Porém, em alguns momentos, é necessário que o arquivo obtenha informações dinâmicas de outras fontes de dados.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;E é neste momento que a plataforma .NET se demonstra muito útil! Linguagens de outras plataformas, como Java por exemplo, também são capazes de realizar esta tarefa, porém neste post, utilizaremos a linguagem C# da plataforma .NET.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Embora o exemplo a seguir seja um tanto quanto simplista, ele permite ter uma ideia do potencial de arquivos bat.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;No exemplo a seguir criaremos uma classe dinamicamente e geraremos um arquivo bat responsável pela compilação da mesma, transformando esta em uma dll. Para tal, criaremos um projeto do tipo Console:&lt;/span&gt;&lt;br /&gt;


&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpFEYQGl952mbH1EDMqznpDtUF0aHfiWFvLJcj6aNJM1qzAbuhdUCq0aqBe3G0DRUygE9RYhzzcy1UZJhAQjYkzkv13TooHo5UrmKgYr_4PfXKZ0BS3s5h9m7OP0ydFoC5FKHbAPzRzRc/s1600/001.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;223&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpFEYQGl952mbH1EDMqznpDtUF0aHfiWFvLJcj6aNJM1qzAbuhdUCq0aqBe3G0DRUygE9RYhzzcy1UZJhAQjYkzkv13TooHo5UrmKgYr_4PfXKZ0BS3s5h9m7OP0ydFoC5FKHbAPzRzRc/s400/001.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A codificação da classe program será a seguinte:&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;pre class=&quot;c#&quot; name=&quot;code&quot;&gt;string className = &quot;testeBuild&quot;;
string folderPath = @&quot;c:\temp\&quot;;
StringBuilder sBuilderClasse = new StringBuilder();
sBuilderClasse.AppendLine(&quot;using System;&quot;);
sBuilderClasse.AppendLine(&quot;namespace CompileViaBatDemo&quot;);
sBuilderClasse.AppendLine(&quot;{&quot;);
sBuilderClasse.AppendLine(&quot;     public class &quot; + className);
sBuilderClasse.AppendLine(&quot;     {&quot;);
sBuilderClasse.AppendLine(&quot;         public string Hello { &quot;);
sBuilderClasse.AppendLine(&quot;             get {              &quot;);
sBuilderClasse.AppendLine(&quot;                 return \&quot;Hi\&quot;;&quot;);
sBuilderClasse.AppendLine(&quot;             } &quot;);
sBuilderClasse.AppendLine(&quot;         }&quot;);
sBuilderClasse.AppendLine(&quot;     }&quot;);
sBuilderClasse.AppendLine(&quot;}&quot;);
File.WriteAllText(string.Format(&quot;{0}{1}.cs&quot;, folderPath, className), sBuilderClasse.ToString(), Encoding.UTF8);
StringBuilder sBuilderBat = new StringBuilder();
sBuilderBat.AppendLine(@&quot;C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /target:library &quot; + string.Format(&quot;{0}{1}.cs&quot;, folderPath, className));
sBuilderBat.AppendLine(@&quot;del &quot; + string.Format(&quot;{0}{1}.cs&quot;, folderPath, className));
sBuilderBat.AppendLine(@&quot;del &quot; + string.Format(&quot;{0}{1}.bat&quot;, folderPath, className));
sBuilderBat.AppendLine(@&quot;pause&quot;);
File.WriteAllText(string.Format(&quot;{0}{1}.bat&quot;, folderPath, className), sBuilderBat.ToString(), Encoding.ASCII);&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Ao executar este código, será gerado no diretório &quot;c:\temp&quot; nossa classe e o arquivo bat.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVH7KuhcbNGy_u7864Qk4HO0DbpyVVdm4xr2RMv6gjokfTMlONqQhIZs78Nnusw5jNBDqk-ja5Ah6cmfVH17AShzKbLgUOXdgeKPcULOj2qaW5cVsLnrKplgx7nsq98XIoUTCDUo1Kh3M/s1600/002.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;118&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVH7KuhcbNGy_u7864Qk4HO0DbpyVVdm4xr2RMv6gjokfTMlONqQhIZs78Nnusw5jNBDqk-ja5Ah6cmfVH17AShzKbLgUOXdgeKPcULOj2qaW5cVsLnrKplgx7nsq98XIoUTCDUo1Kh3M/s400/002.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Quando o arquivo bat criado é executado, o mesmo gera a dll a partir da compilação da classe, deleta a classe e em seguida a si mesmo.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhebAdp91hfrix9LljpLiwcqFEY-XpbQCCJ-IrF436_1uAfys2q3cnHTdThVTdhc_NT76-MlwcblXiUBvqZIhDT6pY-wTV9zttEspMxnJhW4uQqgws7mssPr_L3_pcA-0YFyJ0Yyywv5bI/s1600/003.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;135&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhebAdp91hfrix9LljpLiwcqFEY-XpbQCCJ-IrF436_1uAfys2q3cnHTdThVTdhc_NT76-MlwcblXiUBvqZIhDT6pY-wTV9zttEspMxnJhW4uQqgws7mssPr_L3_pcA-0YFyJ0Yyywv5bI/s400/003.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Ao Importar a dll criada no Visual Studio, é possível consumir sua classe.&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoM9TJpmfjt-fn0L0T62Jv_JXEINvwnDUyv5xc1qJZ7yx4sY6DGayEuMhpGhfI3LvbgAHDFmB2yhvUa9Wzp27MiknWDORmjihMbo3ty2Ctw55pxtgd8Y-gT4Q5bityKgGZ4EkC-aUiPDs/s1600/005.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;409&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoM9TJpmfjt-fn0L0T62Jv_JXEINvwnDUyv5xc1qJZ7yx4sY6DGayEuMhpGhfI3LvbgAHDFmB2yhvUa9Wzp27MiknWDORmjihMbo3ty2Ctw55pxtgd8Y-gT4Q5bityKgGZ4EkC-aUiPDs/s640/005.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://adotnettalk.blogspot.com/feeds/3341123309926494826/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://adotnettalk.blogspot.com/2015/07/customizacao-de-arquivos-bat-crie.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/3341123309926494826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/3341123309926494826'/><link rel='alternate' type='text/html' href='http://adotnettalk.blogspot.com/2015/07/customizacao-de-arquivos-bat-crie.html' title='Customização de arquivos BAT : Crie arquivos BAT dinâmicamente '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgL__9B5o5iA-vUtmlb0tOWFBJN5lyNJYnEdRQpf-IDRozS3sBmiYHvhbta6_ZJN8L5EwKK8JGUWVIkrH_rWPg5R40dFspX__ntZYvZtvTFcqmOKH3WedZw1fyg4cGD6WO6lxc7SiBuFWo/s72-c/bat_file.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6826107792545068333.post-909051780000006154</id><published>2015-07-16T00:00:00.000-03:00</published><updated>2015-07-16T00:00:03.918-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Front End"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML"/><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="Web"/><title type='text'>JavaScript e OO: Adicionando métodos ao objeto</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho8ocIVhp2Plgxy-aAw2snJPrzzXQVy7iqsayF_OBwWTLC-eYJOFYR2nFGgpA-YFugZ6lho55cKctkU4wvdhU1PYD3saH6LQMf46aOyN7FjkeIkHXAYixs8Ht4s_nHjd2bNVWAsRUhRI8/s1600/2723902840_651d85739b.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;204&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho8ocIVhp2Plgxy-aAw2snJPrzzXQVy7iqsayF_OBwWTLC-eYJOFYR2nFGgpA-YFugZ6lho55cKctkU4wvdhU1PYD3saH6LQMf46aOyN7FjkeIkHXAYixs8Ht4s_nHjd2bNVWAsRUhRI8/s320/2723902840_651d85739b.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Na &lt;a href=&quot;http://adotnettalk.blogspot.com.br/2015/07/javascript-e-oo-criando-objetos.html&quot; target=&quot;_blank&quot;&gt;post anterior&lt;/a&gt;&amp;nbsp;vimos como criar objetos e manipular suas&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;propriedades&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;através do JavaScript&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;. Porém, &quot;nem só de propriedades viverá um objeto&quot;!&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Um objeto pode possuir também um ou mais métodos/funções. Por exemplo:&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Pensemos num objeto &quot;Carro&quot;. Um carro geralmente possui as seguintes características:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Ano&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Cor&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Fabricante&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Modelo&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Traduzindo estas informações nas propriedades de nosso objeto no JavaScript, teríamos algo mais ou menos assim:&lt;/span&gt;

&lt;br /&gt;
&lt;pre class=&quot;html&quot; name=&quot;code&quot;&gt;var carro = {
    ano: 0
   ,cor: &quot;&quot;
   ,fabricante: &quot;&quot;
   ,modelo: &quot;&quot;
};
&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Porém, todo carro que se preze realiza algumas &quot;ações básicas&quot; como:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Desligar&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Ligar&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Buzinar&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;No JavaScript, a sintaxe básica para a criação de uma função ou método é:&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;html&quot; name=&quot;code&quot;&gt;function [&quot;nome da função&quot;]([parâmetros]) {
&amp;nbsp;[Corpo da função]
}
&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A definição de uma função em um objeto JavaScript não é muito diferente. Abaixo demonstro como seria a implementação das funções necessárias para nosso objeto &amp;nbsp;(desligar, ligar, buzinar):&lt;/span&gt;
&lt;/div&gt;
&lt;pre class=&quot;html&quot; name=&quot;code&quot;&gt;var carro = {
    ano: 0
   ,cor: &quot;&quot;
   ,fabricante: &quot;&quot;
   ,modelo: &quot;&quot;
   ,desligar: function(){
       console.log(&quot;O carro foi desligado&quot;);
   }
   ,ligar: function(){
       console.log(&quot;O carro foi ligado&quot;);   
   }
   ,buzinar: function(){
       console.log(&quot;O carro buzinou&quot;);   
   }
}
&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Após a criação do objeto, para invocar os métodos de nosso objeto, basta utilizar a sintaxe &quot;&lt;i&gt;[objeto].[método]&lt;/i&gt;&quot;. Ao executar o comando &quot;carro.ligar()&quot;, será exibido no console do navegador a mensagem &quot;O carro foi ligado&quot;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://adotnettalk.blogspot.com/feeds/909051780000006154/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://adotnettalk.blogspot.com/2015/07/javascript-e-oo-adicionando-metodos-ao.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/909051780000006154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/909051780000006154'/><link rel='alternate' type='text/html' href='http://adotnettalk.blogspot.com/2015/07/javascript-e-oo-adicionando-metodos-ao.html' title='JavaScript e OO: Adicionando métodos ao objeto'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho8ocIVhp2Plgxy-aAw2snJPrzzXQVy7iqsayF_OBwWTLC-eYJOFYR2nFGgpA-YFugZ6lho55cKctkU4wvdhU1PYD3saH6LQMf46aOyN7FjkeIkHXAYixs8Ht4s_nHjd2bNVWAsRUhRI8/s72-c/2723902840_651d85739b.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6826107792545068333.post-7057735672502591986</id><published>2015-07-14T00:00:00.000-03:00</published><updated>2015-07-14T00:00:00.627-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Banco de Dados"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>SQL Server: Auditando alterações no Banco de Dados</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghzs2y2kET6kWiu6wr5sfOXFpOqy6vdAc3U3Y7HNECjyaep987TaOtYiJq62TGkghgea7eI2IBZmXZoDwJyLxl5mV_MB5PEKX-g5GtPD71BNKG6l7qnxb7AANuNcLIGA6dQhKF-zUkWe8/s1600/Imagem1.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghzs2y2kET6kWiu6wr5sfOXFpOqy6vdAc3U3Y7HNECjyaep987TaOtYiJq62TGkghgea7eI2IBZmXZoDwJyLxl5mV_MB5PEKX-g5GtPD71BNKG6l7qnxb7AANuNcLIGA6dQhKF-zUkWe8/s1600/Imagem1.png&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Após finalizar os ajustes em um sistema, é chegada a hora de gerar um pacote para publicação.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Geralmente o código fonte é armazenado em um controlador de versão, o que facilita na hora de &quot;lembrar&quot; e separar os arquivos que sofreram alterações ao longo do processo de desenvolvimento.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;No caso do banco de dados, caso o desenvolvedor não mantenha um controle dos scripts das alterações realizadas no banco de dados, a chance de uma procedure, tabela ou função a ser alterada em produção ser esquecida é muito grande.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Dado este inconveniente, algumas empresas distribuem/comercializam softwares e plugins responsáveis por auditar a base. Ou seja, todas as alterações realizadas nos objetos do banco de dados são registrados e posteriormente é possível obter um script assertivo das mudanças a serem realizadas no ambiente de produção.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Porém, na ausência de um plugin ou software para auditoria das alterações realizadas em base, é possível se guiar pelo objeto &lt;i&gt;sys.all_objects&lt;/i&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Ao realizar a consulta abaixo, o SQL Server traz todos os objetos que foram criados/alterados no banco de dados em relação ao período utilizado no filtro da consulta.&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;sql&quot; name=&quot;code&quot;&gt;SELECT
    name,
    create_date,
    modify_date
FROM sys.all_objects
WHERE create_date &amp;gt; &#39;[[Data]&#39;
or modify_date &amp;gt; &#39;[Data]&#39;
&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://adotnettalk.blogspot.com/feeds/7057735672502591986/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://adotnettalk.blogspot.com/2015/07/sql-server-auditando-alteracoes-no.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/7057735672502591986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/7057735672502591986'/><link rel='alternate' type='text/html' href='http://adotnettalk.blogspot.com/2015/07/sql-server-auditando-alteracoes-no.html' title='SQL Server: Auditando alterações no Banco de Dados'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghzs2y2kET6kWiu6wr5sfOXFpOqy6vdAc3U3Y7HNECjyaep987TaOtYiJq62TGkghgea7eI2IBZmXZoDwJyLxl5mV_MB5PEKX-g5GtPD71BNKG6l7qnxb7AANuNcLIGA6dQhKF-zUkWe8/s72-c/Imagem1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6826107792545068333.post-7844333542940186032</id><published>2015-07-09T00:00:00.002-03:00</published><updated>2015-07-09T00:00:04.429-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="Front End"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML"/><category scheme="http://www.blogger.com/atom/ns#" term="Microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><category scheme="http://www.blogger.com/atom/ns#" term="Web"/><title type='text'>ASP.NET MVC &amp; Chosen - Parte 1</title><content type='html'>&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Conforme prometido, hoje irei mostrar alguns exemplos práticos do uso do plugin &lt;a href=&quot;http://harvesthq.github.io/chosen/&quot;&gt;Chosen&lt;/a&gt;. Neste post irei demonstrar o passo a passo de como utilizar este plugin no Visual Studio utilizando o template ASP.NET MVC. Apenas lembrando que este plugin pode ser utilizado normalmente com HTML e JavaScript/JQuery.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Primeiramente precisamos criar um projeto ASP.NET MVC no Visual Studio:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCp054kfcBUTsAXAtqAFBNjQIM4HpJK_zuj1kT-ERVswnRPmYI_U7q-64Pw_2ZRzj0nOivglIsWHpM1QkrVkrhyphenhyphenFTr_vmLSYPytWvaO4mTHd74rfcAYw-F0Uh2a3cn5G2u54gHKeEKIis/s1600/001.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;356&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCp054kfcBUTsAXAtqAFBNjQIM4HpJK_zuj1kT-ERVswnRPmYI_U7q-64Pw_2ZRzj0nOivglIsWHpM1QkrVkrhyphenhyphenFTr_vmLSYPytWvaO4mTHd74rfcAYw-F0Uh2a3cn5G2u54gHKeEKIis/s640/001.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6NAGnnNuLN42ztR3sWroZHkSOSOPtLLyTS2xesyaFYxhlDDuGTea8S3qRIPBgkHCaD0Tla-uDMF_zzUYPaomDdVTLqhkz6vcRl7JSHqL54oT1g4dGpX15xYy0gwdo7puHjM-ZT5ZwUw8/s1600/002.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;358&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6NAGnnNuLN42ztR3sWroZHkSOSOPtLLyTS2xesyaFYxhlDDuGTea8S3qRIPBgkHCaD0Tla-uDMF_zzUYPaomDdVTLqhkz6vcRl7JSHqL54oT1g4dGpX15xYy0gwdo7puHjM-ZT5ZwUw8/s640/002.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVxyBfLEM11rts270Z-ca7e2hInCpxmFk8bfIpSYugWAHReb_4wthCsWsl2hyIJ86ir0WeTqYDbAfUcAlfvTAsC24GuaVclpryN8zP9NNKznAvlj9NGSgP6x8hy4S1jIU7mnJ8yAEIrVo/s1600/003.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;356&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVxyBfLEM11rts270Z-ca7e2hInCpxmFk8bfIpSYugWAHReb_4wthCsWsl2hyIJ86ir0WeTqYDbAfUcAlfvTAsC24GuaVclpryN8zP9NNKznAvlj9NGSgP6x8hy4S1jIU7mnJ8yAEIrVo/s640/003.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Feito isso, iremos acrescentar os arquivos &lt;i&gt;CSS&lt;/i&gt; e &lt;i&gt;JavaScript &lt;/i&gt;que compõe a API nas pastas Content e Scripts:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7hcLQ7WqGQ2kDJyhf-PRWeqF5Y5uoAnbXJIBIvAhPOZYYNeOIRm-SYxqnLH9w4KhyvQbYklGH22M2LAyXgiH6r4eS9JCiFpdwHQhHhHONFRpD2lDaHM_mP0Gv9zJuQcvU4GnS0FoLUUs/s1600/005.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7hcLQ7WqGQ2kDJyhf-PRWeqF5Y5uoAnbXJIBIvAhPOZYYNeOIRm-SYxqnLH9w4KhyvQbYklGH22M2LAyXgiH6r4eS9JCiFpdwHQhHhHONFRpD2lDaHM_mP0Gv9zJuQcvU4GnS0FoLUUs/s640/005.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Criaremos uma Controller responsável por gerenciar as requisições de nossa página de exemplo:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNjy6rDyb4vmCrlBTD-dgsIsfed1XCtahr7jVM-WG3EmwFUNW3spc5yBi366T1jG-EL9Xuwjp6nx4qsAxuRVE5NluarEGxPijPDfJlSGEI-kU1hlVYPgtQwpr9lJNMAOm98Ieb8lpjBkY/s1600/006.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;358&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNjy6rDyb4vmCrlBTD-dgsIsfed1XCtahr7jVM-WG3EmwFUNW3spc5yBi366T1jG-EL9Xuwjp6nx4qsAxuRVE5NluarEGxPijPDfJlSGEI-kU1hlVYPgtQwpr9lJNMAOm98Ieb8lpjBkY/s640/006.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Nossa controller ficará assim:&lt;/span&gt;
&lt;br /&gt;
&lt;pre class=&quot;csharp&quot; name=&quot;code&quot;&gt;using ChosenExample.Web.Models;
using System.Web.Mvc;

namespace ChosenExample.Web.Controllers
{
    public class ChosenExampleController : Controller
    {
        public ActionResult Index()
        {
            return View(new ListHelper());
        }
    }
}
&lt;/pre&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A action &lt;i&gt;Index&lt;/i&gt; utilizada na Controller acima, retorna uma View passando nosso objeto Model (ListHelper):
&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;csharp&quot; name=&quot;code&quot;&gt;using System.Collections.Generic;

namespace ChosenExample.Web.Models
{
    public class ListHelper
    {
        public int CdAnimal { get; set; }
        public int CdProduto { get; set; }
        public List&lt;animal&gt; Animais { get; set; }
        public List&lt;produto&gt; Produtos { get; set; }

        public ListHelper()
        {
            FillAnimais();
            FillProdutos();
        }

        private void FillProdutos()
        {
            Produtos = new List&lt;produto&gt;();
            Produtos.Add(new Produto() { IdProduto = 1, DsProduto = &quot;Computador&quot; });
            Produtos.Add(new Produto() { IdProduto = 2, DsProduto = &quot;TV&quot; });
            Produtos.Add(new Produto() { IdProduto = 3, DsProduto = &quot;Video Game&quot; });
            Produtos.Add(new Produto() { IdProduto = 4, DsProduto = &quot;DVD Player&quot; });
            Produtos.Add(new Produto() { IdProduto = 5, DsProduto = &quot;Smart Phone&quot; });
            Produtos.Add(new Produto() { IdProduto = 6, DsProduto = &quot;iPhone&quot; });
            Produtos.Add(new Produto() { IdProduto = 7, DsProduto = &quot;Laptop&quot; });
            Produtos.Add(new Produto() { IdProduto = 8, DsProduto = &quot;Janela&quot; });
            Produtos.Add(new Produto() { IdProduto = 9, DsProduto = &quot;Mesa&quot; });
            Produtos.Add(new Produto() { IdProduto = 10, DsProduto = &quot;Lâmpada&quot; });
            Produtos.Add(new Produto() { IdProduto = 11, DsProduto = &quot;Teclado&quot; });
        }

        private void FillAnimais()
        {
            Animais = new List&lt;animal&gt;();
            Animais.Add(new Animal() { IdAnimal = 1, DsAnimal = &quot;Cachorro&quot; });
            Animais.Add(new Animal() { IdAnimal = 2, DsAnimal = &quot;Gato&quot; });
            Animais.Add(new Animal() { IdAnimal = 3, DsAnimal = &quot;Pássaro&quot; });
            Animais.Add(new Animal() { IdAnimal = 4, DsAnimal = &quot;Sapo&quot; });
            Animais.Add(new Animal() { IdAnimal = 5, DsAnimal = &quot;Peixe&quot; });
            Animais.Add(new Animal() { IdAnimal = 6, DsAnimal = &quot;Lagarto&quot; });
            Animais.Add(new Animal() { IdAnimal = 7, DsAnimal = &quot;Urso&quot; });
            Animais.Add(new Animal() { IdAnimal = 8, DsAnimal = &quot;Cavalo&quot; });
            Animais.Add(new Animal() { IdAnimal = 9, DsAnimal = &quot;Girafa&quot; });
            Animais.Add(new Animal() { IdAnimal = 10, DsAnimal = &quot;Elefante&quot; });
            Animais.Add(new Animal() { IdAnimal = 11, DsAnimal = &quot;Leão&quot; });
        }
    }
}
&lt;/animal&gt;&lt;/produto&gt;&lt;/produto&gt;&lt;/animal&gt;&lt;/pre&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;As classes abaixo serão utilizadas na tipagem das listas de nossa Model
&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;csharp&quot; name=&quot;code&quot;&gt;    public class Produto
    {
        public int IdProduto { get; set; }
        public string DsProduto { get; set; }
    }
&lt;/pre&gt;
&lt;pre class=&quot;csharp&quot; name=&quot;code&quot;&gt;    public class Animal
    {
        public int IdAnimal { get; set; }
        public string DsAnimal { get; set; }
    }
&lt;/pre&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Nossa Index (View) conterá dois dropdownlists a serem utilizados em nosso exemplo e um botão a ser utilizado no próximo post&lt;/span&gt;.
&lt;br /&gt;
&lt;pre class=&quot;html&quot; name=&quot;code&quot;&gt;@model ChosenExample.Web.Models.ListHelper
@{
    ViewBag.Title = &quot;Exemplos&quot;;
}
&lt;script src=&quot;~/Scripts/jquery-2.1.4.min.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;~/Scripts/Chosen/chosen.jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;h2&gt;
Exemplos Chosen&lt;/h2&gt;
@Html.DropDownListFor(t =&amp;gt; t.CdAnimal, new SelectList(Model.Animais, &quot;IdAnimal&quot;, &quot;DsAnimal&quot;), &quot;Selecione&quot;, new { multiple = &quot;&quot;, @class = &quot;chzn-select search-dropdown chosen-select&quot;, data_placeholder = &quot;Selecione&quot;, style=&quot;width:400px&quot; })
@Html.DropDownListFor(t =&amp;gt; t.CdProduto, new SelectList(Model.Produtos, &quot;IdProduto&quot;, &quot;DsProduto&quot;), &quot;Selecione&quot;, new { @class = &quot;chzn-select search-dropdown chosen-select&quot;, data_placeholder = &quot;Selecione&quot;, style = &quot;width:400px&quot; })
&amp;lt;input type=&quot;submit&quot; name=&quot;btnEnviar&quot; value=&quot;Enviar&quot; /&amp;gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Antes de seguir em frente, existem alguns pontos interessantes a serem observados e entendidos:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;O atributo&amp;nbsp;&lt;u&gt;multiple = &quot;&quot;&lt;/u&gt;&amp;nbsp;indica que o controle será múltipla escolha, tornando possível a seleção de mais de um valor.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A classe&amp;nbsp;&lt;u&gt;search-dropdown&lt;/u&gt; habilita a busca no campo&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Ao executar a aplicação, o resultado é o seguinte:

&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdYJqcb_Fnnxe_oE6LyKirdd_2TPTDpbAKzJNquuV9OYZSD43JdjkUc71aF2pfk8RLHZdmUIetkzfS7p8ITV2NC_qUkWbrjEDGK37C8eThhDD_zxgsIplQwmvORp64GGCbbCrHpconi9M/s1600/013.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;304&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdYJqcb_Fnnxe_oE6LyKirdd_2TPTDpbAKzJNquuV9OYZSD43JdjkUc71aF2pfk8RLHZdmUIetkzfS7p8ITV2NC_qUkWbrjEDGK37C8eThhDD_zxgsIplQwmvORp64GGCbbCrHpconi9M/s640/013.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Para inicializar o plugin, basta inserir este trecho de código na página dentro da tag script:
&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;jscript&quot; name=&quot;code&quot;&gt;$(document).ready(function(){
    $(&quot;.chosen-select&quot;).chosen()
});
&lt;/pre&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;E pronto! Bem diferente da aparência e comportamento padrão não?&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiONiPbpuQzwhfrHBgCaKVQkRCkTA5Wk_8cwydmUkxNd1HMm7dL4LUwwgxvtWY4RhkiDluFk2TDlor7zma-AfRJrHrnQh_g6FVaPOgJ7N905Fc1AeakQmuYnsnDnq2V5sdicVX2RyH7FE0/s1600/014.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;332&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiONiPbpuQzwhfrHBgCaKVQkRCkTA5Wk_8cwydmUkxNd1HMm7dL4LUwwgxvtWY4RhkiDluFk2TDlor7zma-AfRJrHrnQh_g6FVaPOgJ7N905Fc1AeakQmuYnsnDnq2V5sdicVX2RyH7FE0/s640/014.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Em uma próxima postagem irei abordar o tratamento e manipulação deste campo na Controller.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://adotnettalk.blogspot.com/feeds/7844333542940186032/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://adotnettalk.blogspot.com/2015/07/aspnet-mvc-chosen-parte-1.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/7844333542940186032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/7844333542940186032'/><link rel='alternate' type='text/html' href='http://adotnettalk.blogspot.com/2015/07/aspnet-mvc-chosen-parte-1.html' title='ASP.NET MVC &amp; Chosen - Parte 1'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCp054kfcBUTsAXAtqAFBNjQIM4HpJK_zuj1kT-ERVswnRPmYI_U7q-64Pw_2ZRzj0nOivglIsWHpM1QkrVkrhyphenhyphenFTr_vmLSYPytWvaO4mTHd74rfcAYw-F0Uh2a3cn5G2u54gHKeEKIis/s72-c/001.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6826107792545068333.post-5809393727995536565</id><published>2015-07-07T00:00:00.002-03:00</published><updated>2015-07-07T00:00:03.221-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Browser"/><category scheme="http://www.blogger.com/atom/ns#" term="Developer Tools"/><category scheme="http://www.blogger.com/atom/ns#" term="F12"/><category scheme="http://www.blogger.com/atom/ns#" term="Front End"/><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="Web"/><title type='text'>JavaScript e OO: Criando objetos</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpsyD7Caxrtqdl4h73Op1pYtKN243S9Fc3JMDrPjXXz6QvVNHfSHTTn_I-LaYWGpGIaQpWKmEFxRh16VI3DBiQsG6_dyFMM1mXNUgasAJjLgB1tuwor4nvY7lOzs39ciXEiBa9iOhi2MY/s1600/javascript.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;150&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpsyD7Caxrtqdl4h73Op1pYtKN243S9Fc3JMDrPjXXz6QvVNHfSHTTn_I-LaYWGpGIaQpWKmEFxRh16VI3DBiQsG6_dyFMM1mXNUgasAJjLgB1tuwor4nvY7lOzs39ciXEiBa9iOhi2MY/s320/javascript.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Embora seja uma linguagem&amp;nbsp;&lt;a href=&quot;https://en.wikipedia.org/wiki/Strong_and_weak_typing&quot; target=&quot;_blank&quot;&gt;fracamente tipada&lt;/a&gt;, com o passar do tempo o JavaScript vem ganhando cada vez mais melhorias e funcionalidades.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A tipagem desta linguagem facilita a manipulação de suas variáveis e objetos, visto que estes podem ser criados dinamicamente em tempo de execução.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Na maioria das linguagens orientadas a objeto, como Java/C#/C++, o processo de criação de objetos consiste em definir, criar e&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;instanciar&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;uma classe.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Com o JavaScript não é muito diferente! A vantagem deve-se ao fato de o JavaScript não precisar ser compilado antes da interpretação do script.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Caso fôssemos criar um objeto &quot;Pessoa&quot;, utilizando a linguagem C# por exemplo, &amp;nbsp;o código fonte seria algo mais ou menos assim:&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;csharp&quot; name=&quot;code&quot;&gt;public class Pessoa
{
&amp;nbsp;&amp;nbsp;public string Nome { get; set; }
&amp;nbsp;&amp;nbsp;public int Idade { get; set; }
}
&lt;/pre&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;No caso do JavaScript, a implementação desta classe poderia ser feita (de modo simplista), da seguinte maneira:

&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;html&quot; name=&quot;code&quot;&gt;var pessoa = { 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Nome: &quot;&quot;
&amp;nbsp;&amp;nbsp;, Idade: 0
};
&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Devido ao JavaScript ser fracamente tipado, os campos/propriedades da minha classe &quot;pessoa&quot;, são inicializados para que os mesmos &quot;assumam&quot; um tipo.
No caso da classe C#, os tipos são pré definidos no momento da criação da classe. Para acessar um atributo de minha classe &quot;Pessoa&quot;, é necessário primeiramente instanciar a classe e efetuar a chamada através do objeto &quot;p&quot; criado:

&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;csharp&quot; name=&quot;code&quot;&gt;Pessoa p = new Pessoa();
//Acesso e imprimo o atributo nome do meu objeto &quot;p&quot;
Console.WriteLine(p.Nome);
&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Já para o JavaScript, existem outras maneiras de se acessar as propriedades de objetos, chamadas também de notações. Abaixo demonstro duas delas:&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;1 - Sintaxe de ponto (dot notation):&lt;/b&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A propriedade é acessada assim como no C#, &lt;i&gt;objeto.propriedade&lt;/i&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre class=&quot;html&quot; name=&quot;code&quot;&gt;pessoa.nome = &quot;Bruno&quot;;
&lt;/pre&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;2 - Sintaxe de colchetes (bracket notation):&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;O acesso a propriedade do objeto lembra o acesso a valores em matrizes, &lt;i&gt;objeto[&quot;propriedade&quot;]&lt;/i&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre class=&quot;html&quot; name=&quot;code&quot;&gt;pessoa[&quot;nome&quot;] = &quot;Bruno&quot;; 
&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Outro ponto interessante que faz do JavaScript uma linguagem poderosa, é o fato de se poder criar propriedades para objetos existentes em tempo de execução. Nosso objeto &quot;pessoa&quot; até o momento possuia duas propriedades: &quot;nome&quot; e &quot;idade&quot;. Caso seja necessário acrescentar uma nova propriedade a este objeto, como por exemplo &quot;peso&quot;, basta &quot;acessar a nova propriedade&quot;: 
&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;html&quot; name=&quot;code&quot;&gt;pessoa.peso = 70; 
&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Feito isso, o objeto &quot;pessoa&quot;, passa a ter também a propriedade peso. Incrível, não?&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Para quem desejar se aprofundar mais, encontrei um link interessante bem &lt;/span&gt;&lt;a href=&quot;http://www.smashingmagazine.com/2010/04/20/seven-javascript-things-i-wish-i-knew-much-earlier-in-my-career/&quot; style=&quot;font-family: Verdana, sans-serif;&quot; target=&quot;_blank&quot;&gt;aqui&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://adotnettalk.blogspot.com/feeds/5809393727995536565/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://adotnettalk.blogspot.com/2015/07/javascript-e-oo-criando-objetos.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/5809393727995536565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/5809393727995536565'/><link rel='alternate' type='text/html' href='http://adotnettalk.blogspot.com/2015/07/javascript-e-oo-criando-objetos.html' title='JavaScript e OO: Criando objetos'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpsyD7Caxrtqdl4h73Op1pYtKN243S9Fc3JMDrPjXXz6QvVNHfSHTTn_I-LaYWGpGIaQpWKmEFxRh16VI3DBiQsG6_dyFMM1mXNUgasAJjLgB1tuwor4nvY7lOzs39ciXEiBa9iOhi2MY/s72-c/javascript.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6826107792545068333.post-4636269040357412194</id><published>2015-07-02T00:00:00.000-03:00</published><updated>2015-07-02T22:28:58.366-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="Banco de Dados"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Integração"/><category scheme="http://www.blogger.com/atom/ns#" term="Microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>Common Language Run-time Integration: crie e utilize métodos .NET em procedures</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikfZUmuMJJt_srfUZFqTRiD4XqE_q-qrq2PD96T-e-SeppiZ6ddeMNpO8tDboYq7KniGpA5vMdJdUXbnP75iLLBzbod5l074dXvYkBd-sKg9YoVanvri1MuEJN5LUq0livPmzr0uDKOSw/s1600/csharpDB.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;145&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikfZUmuMJJt_srfUZFqTRiD4XqE_q-qrq2PD96T-e-SeppiZ6ddeMNpO8tDboYq7KniGpA5vMdJdUXbnP75iLLBzbod5l074dXvYkBd-sKg9YoVanvri1MuEJN5LUq0livPmzr0uDKOSw/s400/csharpDB.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;No desenvolvimento de uma aplicação que realize acesso a base de dados, geralmente a comunicação é unilateral. Ou seja, a aplicação conhece e realiza acessos ao banco de dados, enquanto que o banco de dados desconhece a aplicação.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Dependendo do nível de complexidade da aplicação, visando evitar a repetição de código, parte da lógica da aplicação (regras de negócio) pode ser &lt;a href=&quot;https://en.wikipedia.org/wiki/Encapsulation_(computer_programming)&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;encapsulada&lt;/a&gt;, geralmente&amp;nbsp;em uma DLL.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Quando se conhece o negócio, é possível a manipulação e consulta dos objetos do banco de dados através de procedures e comandos SQL. Porém, quando o acesso a DLL encontra-se ofuscado ou criptografado, fica a questão: e se fosse possível utilizar um método de uma DLL em uma procedure?&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Por mais exótica que aparente ser (e é) esta solução, sim, é possível consumir uma DLL e realizar a chamada de seus métodos a partir de uma procedure ou função no banco de dados. Para realizar este acesso, basta seguir os seguintes passos:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Primeiramente é necessário configurar o banco de dados habilitando o CLR e ativar o TRUSTWORTHY:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: maroon; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;sp_configure&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;&#39;clr enable&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&amp;nbsp;1&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;GO&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;RECONFIGURE&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;ALTER&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;DATABASE&lt;/span&gt;&amp;nbsp;TreinamentoNET&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;SET&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;TRUSTWORTHY&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;ON&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;1 - Abra o Visual Studio e clique em: File &amp;gt; New &amp;gt; Project ...&amp;gt; Visual C# &amp;gt; Windows &amp;gt; Class Library&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivXhTZI7QphHqgN8Ig6HpNGcynDOxNKzSguEKahSR4V6dMN4I8PS6QjmMyZKQF4FrM6pPMo5LRlgIGHqLV4ejyP21scsH7ZqaGaN5lIC0sCNLIhdLcRBc1w_xexmRq9iOU4EV2j5tUmu8/s1600/clri_1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;388&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivXhTZI7QphHqgN8Ig6HpNGcynDOxNKzSguEKahSR4V6dMN4I8PS6QjmMyZKQF4FrM6pPMo5LRlgIGHqLV4ejyP21scsH7ZqaGaN5lIC0sCNLIhdLcRBc1w_xexmRq9iOU4EV2j5tUmu8/s640/clri_1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;2 - No menu &quot;Projeto&quot;, selecione a opção &quot;Add New Item&quot; e em seguida &quot;Class&quot;.&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP4KHVUX_fEISJpF4jCjVYz5hIfcc6bPA2RJ5pgmabqcbgwMBIJNYXVavFY8yNG1HIe6hiBBkRVjGTZy3AoTLA-Il5ruVvNE-0zKaCbrVRNEd1MPaDsW0VzVSvXozoNgMdVxgik-soLJs/s1600/clri_2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP4KHVUX_fEISJpF4jCjVYz5hIfcc6bPA2RJ5pgmabqcbgwMBIJNYXVavFY8yNG1HIe6hiBBkRVjGTZy3AoTLA-Il5ruVvNE-0zKaCbrVRNEd1MPaDsW0VzVSvXozoNgMdVxgik-soLJs/s640/clri_2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;3 - Segue abaixo a classe utilizada neste exemplo:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre class=&quot;csharp&quot; name=&quot;code&quot;&gt;using System;
using Microsoft.SqlServer.Server;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using System.Data;
namespace ProcDotNet.Classes
{
    public class ProcedureDotNET
    {
        [SqlProcedure()]
        public static void InsertProduct(SqlString nome, SqlString observacao)
        {
            using (SqlConnection conn = new SqlConnection(@&quot;Data Source = localhost\SQL; Initial Catalog = TreinamentoNET; User ID = sa ; Password = P@$$w0rd&quot;))
            {
                SqlCommand objCommand = new SqlCommand();
                objCommand.Parameters.AddWithValue(&quot;@nome&quot;, nome);
                objCommand.Parameters.AddWithValue(&quot;@observacao&quot;, observacao);
                objCommand.CommandText = &quot;INSERT INTO tbProduto (nome, observacao) VALUES (@nome, @observacao)&quot;;
                objCommand.Connection = conn;
                conn.Open();
                objCommand.ExecuteNonQuery();
                conn.Close();
            }
        }
    }
}
&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Na classe acima, o método InsertProduct recebe dois parâmetros e realiza o insert em tabela. É importante lembrar que o projeto class library deve utilizar o framework .NET correspondente a versão suportada pelo SQL Server utilizado. No caso do SQL Server 2008 por exemplo, a versão do framework suportada é a 2.0&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgal1dMhGDC-b4wbwN8EJzy8cu3Kuh0hAewAvbXc0cuitfN9R3uveSznNSb-uMzZIXVgGB8dRCabQ-XTpJ50ZMsdY1SkE7qFD54faeuJihIHKgYLemlW6fi2Uq6Y576hiZoXs4KcJBR2o/s1600/clri_4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;342&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgal1dMhGDC-b4wbwN8EJzy8cu3Kuh0hAewAvbXc0cuitfN9R3uveSznNSb-uMzZIXVgGB8dRCabQ-XTpJ50ZMsdY1SkE7qFD54faeuJihIHKgYLemlW6fi2Uq6Y576hiZoXs4KcJBR2o/s640/clri_4.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Após a compilação do projeto, é necessário registrar a DLL no banco de dados. Para isso, basta executar os scripts abaixo:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;CREATE&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;ASSEMBLY&lt;/span&gt;&amp;nbsp;ProcedureDotNET&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;AUTHORIZATION&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;dbo&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;&#39;C:\Users\bruno\&lt;wbr&gt;&lt;/wbr&gt;Desktop\ProcDotNet\ProcDotNet.&lt;wbr&gt;&lt;/wbr&gt;Classes\bin\Debug\ProcDotNet.&lt;wbr&gt;&lt;/wbr&gt;Classes.dll&#39;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;WITH&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;PERMISSION_SET&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;UNSAFE&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;GO&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-size: 12pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Após a execução do script acima, o SQL Server cria um assembly no banco de dados. A partir deste assembly é possível efetuar as chamadas aos métodos da DLL a partir de procedures e funções.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;No exemplo abaixo, uma procedure é criada para receber os dois parâmetros requisitados pelo método e invocá-lo:&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;im&quot; style=&quot;background-color: white; color: #500050; font-family: arial, sans-serif; font-size: 12.8000001907349px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;CREATE&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;PROCEDURE&lt;/span&gt;&amp;nbsp;sp_insert_product&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp; @nome&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;nvarchar&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;50&lt;span style=&quot;color: grey;&quot;&gt;),&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp; @observacao&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;nvarchar&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;50&lt;span style=&quot;color: grey;&quot;&gt;)&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;AS&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;EXTERNAL&lt;/span&gt;&amp;nbsp;NAME ProcedureDotNET&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;[ProcDotNet.&lt;wbr&gt;&lt;/wbr&gt;Classes.ProcedureDotNET]&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;Inser&lt;wbr&gt;&lt;/wbr&gt;tProduct&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;GO&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-size: 12pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Feito isso, é chegada a hora de testar nossa criação. Ao executar a procedure enviando os parâmetros, as informações são persistidas na base de dados:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;sp_insert_product&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;&#39;Carro&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;&#39;4 portas&#39;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-size: 12pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Ao realizar uma consulta na tabela, é possível verificar que tudo funciona perfeitamente e que os dados enviados para a procedure foram persistidos:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: grey;&quot;&gt;*&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;from&lt;/span&gt;&amp;nbsp;tbProduto&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKZzuhmd-05SOcy3oxT2FTXMcIkU74XT65jR5N8SBWIHdiZg_2KReqir1dJCMgRrjPEgo3UeOjpExN01Qg3hA_ZBBGtPO5e4ZQ1bA409azqBbq10zV-2fuF11Jk7DRlHgrbkYzM7wFd8A/s1600/clri_5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;270&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKZzuhmd-05SOcy3oxT2FTXMcIkU74XT65jR5N8SBWIHdiZg_2KReqir1dJCMgRrjPEgo3UeOjpExN01Qg3hA_ZBBGtPO5e4ZQ1bA409azqBbq10zV-2fuF11Jk7DRlHgrbkYzM7wFd8A/s640/clri_5.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://adotnettalk.blogspot.com/feeds/4636269040357412194/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://adotnettalk.blogspot.com/2015/07/common-language-run-time-integration.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/4636269040357412194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/4636269040357412194'/><link rel='alternate' type='text/html' href='http://adotnettalk.blogspot.com/2015/07/common-language-run-time-integration.html' title='Common Language Run-time Integration: crie e utilize métodos .NET em procedures'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikfZUmuMJJt_srfUZFqTRiD4XqE_q-qrq2PD96T-e-SeppiZ6ddeMNpO8tDboYq7KniGpA5vMdJdUXbnP75iLLBzbod5l074dXvYkBd-sKg9YoVanvri1MuEJN5LUq0livPmzr0uDKOSw/s72-c/csharpDB.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6826107792545068333.post-8744765836130409297</id><published>2015-06-30T00:00:00.000-03:00</published><updated>2015-07-02T21:59:14.076-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Browser"/><category scheme="http://www.blogger.com/atom/ns#" term="Developer Tools"/><category scheme="http://www.blogger.com/atom/ns#" term="F12"/><category scheme="http://www.blogger.com/atom/ns#" term="Front End"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML"/><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="Web"/><title type='text'>JavaScript: alert ou console.log? </title><content type='html'>&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRoHnx0SmOpYcr36GmLFtJGz0EORpwYI_3LVYYd0BK-noZVruWZ6Mzvb1iAoQ8Ilu3AzBWO8E72lzxdW2n5G9wGqAuw3miE-zOhyu9KuaJMjmDjsIjhSm9vVTsM884toLrC4FFYtk5VkM/s1600/Imagem1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;88&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRoHnx0SmOpYcr36GmLFtJGz0EORpwYI_3LVYYd0BK-noZVruWZ6Mzvb1iAoQ8Ilu3AzBWO8E72lzxdW2n5G9wGqAuw3miE-zOhyu9KuaJMjmDjsIjhSm9vVTsM884toLrC4FFYtk5VkM/s320/Imagem1.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Lembro me quando comecei a desenvolver&amp;nbsp;sistemas para web. Um novo universo, uma nova realidade. Não precisa compilar? Era tudo novidade!&amp;nbsp;Porém, com o passar do tempo e consequentemente com o aumento da complexidade dos scripts desenvolvidos, surgiu o questionamento: Como eu &quot;debugo&quot; o meu script (JavaScript)?&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A primeira opção a mim apresentada foi o método nativo do JavaScript &quot;&lt;a href=&quot;http://www.w3schools.com/jsref/met_win_alert.asp&quot; target=&quot;_blank&quot;&gt;alert&lt;/a&gt;&quot; e em primeira instância, pensei ter descoberto &quot;O Santo Graal&quot; para depuração de scripts.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;No entanto, notei que o método &quot;alert&quot;, não era o suficiente para exibir estruturas mais complexas como o exemplo abaixo:&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;html&quot; name=&quot;code&quot;&gt;var produto = { Nome: &#39;Computer&#39;,
                  PrecoUnidade: 1110.25,
                  QuantidadeEstoque: 2
              };
&lt;/pre&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Caso eu passe como parâmetro o objeto &quot;produto&quot;, o navegador me exibirá o seguinte resultado (pouco útil):&lt;/span&gt;
&lt;br /&gt;
&lt;pre class=&quot;html&quot; name=&quot;code&quot;&gt;alert(produto);&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUASvdUcIZ58HsPyp8skEeVHhpkEnoEsTbXdZoH7ZpHqqEo7bZyKarqRB4xxUn3wLLlpEcQoQDM9BswLVSpb9dBKswP7blfVFT1kIwrFJsU872Z6kVemMjse_GfVdHlvjK9aOs_JQ_74Y/s1600/alertObj.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;133&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUASvdUcIZ58HsPyp8skEeVHhpkEnoEsTbXdZoH7ZpHqqEo7bZyKarqRB4xxUn3wLLlpEcQoQDM9BswLVSpb9dBKswP7blfVFT1kIwrFJsU872Z6kVemMjse_GfVdHlvjK9aOs_JQ_74Y/s320/alertObj.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Ou seja, para objetos, o método alert() não se demonstra tão útil. E neste momento há quem apele para o uso de &quot;alerts&quot; personalizados para inspecionar o objeto criado:&lt;/span&gt;

&lt;br /&gt;
&lt;pre class=&quot;html&quot; name=&quot;code&quot;&gt;alert(&quot;Nome: &#39;&quot;+produto.Nome+&quot;&#39;, Preço: $&quot;+produto.PrecoUnidade);&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP2j52CGgE93FzXwb0I75Q0q4yeB8rGDa6KbPwElsc7jBFrB2tre1troC6bwBVhbok7NfbELbF5govLWaVskIbXC_t6OEGhcL0VB_zXmj9tmzQT0Rl5ri3fqXdGZpWQqcmq02adhsq5YU/s1600/alertPers.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;133&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP2j52CGgE93FzXwb0I75Q0q4yeB8rGDa6KbPwElsc7jBFrB2tre1troC6bwBVhbok7NfbELbF5govLWaVskIbXC_t6OEGhcL0VB_zXmj9tmzQT0Rl5ri3fqXdGZpWQqcmq02adhsq5YU/s320/alertPers.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Neste &amp;nbsp;ponto, podemos chegar a conclusão de que dependendo da complexidade do objeto criado no JavaScript, o uso de alerts para &quot;depuração&quot; é inviável. E é neste momento em que a tecla &quot;F12&quot; do teclado ganha sentido.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Na maioria dos navegadores modernos como o Chrome ou Firefox e as mais recentes versões do IE (a partir do 9), ao pressionar a tecla F12, o navegador exibe uma janela chamada comumente de &quot;Developer Tools (Ferramentas de Desenvolvimento)&quot;.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYdzB6FlsusGHUFc00SAx87g9pl6SMZToZrf9_5yAXnW87qokdoBsFLQ5hjKLMUEPMhjN_WalVboJiJLHSkmBMKEBYlSb3UVdWg3tyW2EiMl5OP9eA0XswiLSOExPVojcpQQDNSxDxhPQ/s1600/console_chrome.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;204&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYdzB6FlsusGHUFc00SAx87g9pl6SMZToZrf9_5yAXnW87qokdoBsFLQ5hjKLMUEPMhjN_WalVboJiJLHSkmBMKEBYlSb3UVdWg3tyW2EiMl5OP9eA0XswiLSOExPVojcpQQDNSxDxhPQ/s640/console_chrome.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Note que que entre as ferramentas disponibilizadas, existe o &quot;Console&quot;, em minha opinião, a ferramenta mais poderosa dos browsers modernos.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A princípio esta ferramenta aparentemente simples não demonstra grande importância, porém ela permite a criação e manipulação de todos os objetos existentes em uma página web em tempo de execução.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Dois fatores fazem que o Console supere de longe o método alert:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;1 - Ele é discreto: não ocorre, a menos que o método alert seja invocado, a exibição de janelas no navegador.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;2 - Ele é eficiente: além de não haver a necessidade de haver um arquivo JavaScript, ele possui &lt;a href=&quot;https://en.wikipedia.org/wiki/Intelligent_code_completion&quot; target=&quot;_blank&quot;&gt;intelisense&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;(dependendo do navegador)&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Veja como ficaria nosso exemplo anterior utilizando o método console.log([texto]) no Console do navegador:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;html&quot; name=&quot;code&quot;&gt;var produto = { Nome: &#39;Computer&#39;,
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PrecoUnidade: 1110.25,
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; QuantidadeEstoque: 2
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };

console.log(&quot;Nome: &#39;&quot;+produto.Nome+&quot;&#39;, Preço: $&quot;+produto.PrecoUnidade);

produto
&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Resultado:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbRVCyLr3-uA2-MizO15lZLmt_WwEAmrSIl3SSo_VqioJJASpqqQZsumQck12KVJ66AnqWWWkYlC-FEhH5mg-zteTuEAt1UdKQvkMrhP4v7LTBzl7CglOz2DAqmrrvyza4HewSk8iDb5w/s1600/console_example.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;228&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbRVCyLr3-uA2-MizO15lZLmt_WwEAmrSIl3SSo_VqioJJASpqqQZsumQck12KVJ66AnqWWWkYlC-FEhH5mg-zteTuEAt1UdKQvkMrhP4v7LTBzl7CglOz2DAqmrrvyza4HewSk8iDb5w/s640/console_example.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Ou seja, tudo ocorre dentro do console sem a necessidade de clicar em botões &quot;OK&quot; ou &quot;Cancelar&quot; como no caso do método &quot;alert()&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Para consultar outros métodos de output, &lt;a href=&quot;http://www.w3schools.com/js/js_output.asp&quot; target=&quot;_blank&quot;&gt;clique aqui&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://adotnettalk.blogspot.com/feeds/8744765836130409297/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://adotnettalk.blogspot.com/2015/06/javascript-alert-ou-consolelog.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/8744765836130409297'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/8744765836130409297'/><link rel='alternate' type='text/html' href='http://adotnettalk.blogspot.com/2015/06/javascript-alert-ou-consolelog.html' title='JavaScript: alert ou console.log? '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRoHnx0SmOpYcr36GmLFtJGz0EORpwYI_3LVYYd0BK-noZVruWZ6Mzvb1iAoQ8Ilu3AzBWO8E72lzxdW2n5G9wGqAuw3miE-zOhyu9KuaJMjmDjsIjhSm9vVTsM884toLrC4FFYtk5VkM/s72-c/Imagem1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6826107792545068333.post-5221153220753827540</id><published>2015-06-25T04:00:00.000-03:00</published><updated>2015-06-25T07:21:27.407-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Front End"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML"/><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="Web"/><title type='text'>JavaScript: 3 maneiras de se utilizar</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Em certos momentos do desenvolvimento nos deparamos com certos dilemas como qual abordagem utilizar na codificação de modo a tentar se distanciar o mínimo possível das &lt;a href=&quot;https://en.wikipedia.org/wiki/Best_coding_practices&quot; target=&quot;_blank&quot;&gt;&quot;Boas práticas de programação&quot;&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTdFO54IKZUmgmTn_-GKXo1wlTZ9tJt6E5GXB9a8OeOHLhb0EC4hMJ_xgnl9wcCLzU-IbPlTd_g3Uu40-xhznYujtDRCvENjemW8l_08TSezduxOH5-CxxzVdI1opXO0clyiRUQOtqZco/s1600/the-good-the-bad-and-the-ugly.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img alt=&quot;O bom, o mal e o feio&quot; border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTdFO54IKZUmgmTn_-GKXo1wlTZ9tJt6E5GXB9a8OeOHLhb0EC4hMJ_xgnl9wcCLzU-IbPlTd_g3Uu40-xhznYujtDRCvENjemW8l_08TSezduxOH5-CxxzVdI1opXO0clyiRUQOtqZco/s400/the-good-the-bad-and-the-ugly.jpg&quot; title=&quot;O bom, o mal e o feio&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Quando o assunto é &quot;Desenvolvimento Web&quot;, nos deparamos com um bombardeio de informações, arquiteturas, frameworks, exemplos, fóruns... Com o &lt;a href=&quot;https://pt.wikipedia.org/wiki/JavaScript&quot; target=&quot;_blank&quot;&gt;JavaScript&lt;/a&gt;&amp;nbsp;não é diferente.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Existem &quot;n&quot; modos de se efetuar chamadas a funções&amp;nbsp;JavaScript e neste artigo citarei as três mais utilizadas comentando suas vantagens ou desvantagens:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;
1 - Inline&amp;nbsp;&lt;/span&gt;&lt;/h4&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Descrição:&lt;span style=&quot;font-size: large;&quot;&gt; &lt;/span&gt;&lt;/b&gt;no exemplo abaixo, a chamada JavaScript é realizada dentro do evento &quot;onload&quot; da página.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Consideração:&lt;/b&gt; pior modo de utilizar.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Motivo:&lt;/b&gt; o script vinculado ao evento &quot;onload&quot; só será executado após o carregamento de todos os assets da página. Caso algum elemento da página possua dependência deste script, erros podem ocorrer. Dependendo de como o navegador interpretar o código abaixo, a função alert pode ser executada antes da renderização dos elementos contidos na tag body, impedindo o carregamento da página até que o usuário interaja com a mensagem.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;pre class=&quot;html&quot; name=&quot;code&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;title&amp;gt;Carregando o javascript&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body onload=&quot;alert(&#39;inline&#39;);&quot;&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;h1&amp;gt;Formas de carregamento&amp;lt;/h1&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;
2 - Embed&lt;/span&gt;&lt;/h4&gt;
&lt;div style=&quot;text-align: justify; white-space: normal;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Descrição:&amp;nbsp;&lt;/b&gt;no exemplo abaixo, a chamada JavaScript é realizada enquanto a página é carregada&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify; white-space: normal;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Consideração&lt;/b&gt;&lt;b&gt;:&lt;/b&gt;&amp;nbsp;as vezes é utilizado.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify; white-space: normal;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Motivo:&lt;/b&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;não interrompe o carregamento da página, pois, o script só é carregado/interpretado após o carregamento dos elementos da página e&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp;pode ser utilizado quando o conteúdo da página é dinâmico ou condicional.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify; white-space: normal;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Exemplo: exibir ou não informações na página ou aplicar alguma regra de negócio sobre campos/elementos de um formulário.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify; white-space: normal;&quot;&gt;
&lt;/div&gt;
&lt;pre class=&quot;html&quot; name=&quot;code&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;title&amp;gt;Carregando o javascript&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;h1&amp;gt;Formas de carregamento&amp;lt;/h1&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; alert(&#39;embed&#39;);
&amp;nbsp; &amp;nbsp; &amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;
3 - External&lt;/span&gt;&lt;/h4&gt;
&lt;div style=&quot;text-align: justify; white-space: normal;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Descrição:&amp;nbsp;&lt;/b&gt;no exemplo abaixo, a chamada JavaScript é realizada a partir de um arquivo externo.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify; white-space: normal;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Consideração&lt;/b&gt;&lt;b&gt;:&lt;/b&gt;&amp;nbsp;melhor maneira.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify; white-space: normal;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Motivo:&lt;/b&gt;&amp;nbsp;além da vantagem mencionada no item 2, deixa o HTML da página menos poluído, já que toda a codificação&amp;nbsp;JavaScript&amp;nbsp;fica em um&amp;nbsp;arquivo externo.&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;pre class=&quot;html&quot; name=&quot;code&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;title&amp;gt;Carregando o javascript&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;h1&amp;gt;Formas de carregamento&amp;lt;/h1&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;script type=&quot;text/javascript&quot; src=&quot;externalFile.js&quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;externalFile.js
&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;html&quot; name=&quot;code&quot;&gt;alert(&#39;external&#39;);
&lt;/pre&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Vale ressaltar que cada navegador possui sua própria engine e efetua o parse &lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;do HTML e JavaScript de modo diferente, resultando consequentemente em comportamentos diferentes.&lt;/span&gt;
</content><link rel='replies' type='application/atom+xml' href='http://adotnettalk.blogspot.com/feeds/5221153220753827540/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://adotnettalk.blogspot.com/2015/06/javascript-3-maneiras-de-se-utilizar.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/5221153220753827540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/5221153220753827540'/><link rel='alternate' type='text/html' href='http://adotnettalk.blogspot.com/2015/06/javascript-3-maneiras-de-se-utilizar.html' title='JavaScript: 3 maneiras de se utilizar'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTdFO54IKZUmgmTn_-GKXo1wlTZ9tJt6E5GXB9a8OeOHLhb0EC4hMJ_xgnl9wcCLzU-IbPlTd_g3Uu40-xhznYujtDRCvENjemW8l_08TSezduxOH5-CxxzVdI1opXO0clyiRUQOtqZco/s72-c/the-good-the-bad-and-the-ugly.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6826107792545068333.post-2146281394520167885</id><published>2015-06-23T00:00:00.000-03:00</published><updated>2015-06-23T00:00:00.987-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML"/><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC"/><category scheme="http://www.blogger.com/atom/ns#" term="Web"/><title type='text'>Chosen: dropdownlists multi-seleção</title><content type='html'>&lt;div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
Crie DropDownLists amigáveis, dinâmicos e multi-selecionáveis!&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float: right; margin-left: 1em; text-align: right;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZPDe6ole61CuJDb9F2xUWZZkzx1KHxIxu-Yhcse9_qMCkAV6Zeoj6ZgnLNuvz9D64Gh6hwFekL-01srPj8NIF4vExDGkx1UM-ow7qJGNVz-10tGPIZbW03gIWZm2f8iSrt-4B6hJt5Qk/s1600/chosen+modelo1.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;147&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZPDe6ole61CuJDb9F2xUWZZkzx1KHxIxu-Yhcse9_qMCkAV6Zeoj6ZgnLNuvz9D64Gh6hwFekL-01srPj8NIF4vExDGkx1UM-ow7qJGNVz-10tGPIZbW03gIWZm2f8iSrt-4B6hJt5Qk/s320/chosen+modelo1.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: right;&quot;&gt;Encontre o que deseja através de busca viva!&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
No desenvolvimento Web, os controles Dropdown (tag select) acabam sendo vastamente utilizados, seja no preenchimento de um formulário ou no filtro de informações.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float: right; text-align: right;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWP5mQqYrEGUdHbU6RTQ28bQSLAvozInp7oUAtpkZIQRvqGoiPLj6pDs4iOQYxyyKFTzU1gu-3fyQL18jMAqZv6_0y_kqf7T42FyAhxcqe6ZihzdIzqnUAhMAl4Rl5RYn93Y2bx_hoTjc/s1600/chosen+modelo2.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;209&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWP5mQqYrEGUdHbU6RTQ28bQSLAvozInp7oUAtpkZIQRvqGoiPLj6pDs4iOQYxyyKFTzU1gu-3fyQL18jMAqZv6_0y_kqf7T42FyAhxcqe6ZihzdIzqnUAhMAl4Rl5RYn93Y2bx_hoTjc/s320/chosen+modelo2.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float: right; margin-left: 1em; text-align: right;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;font-size: 12.8000001907349px; text-align: center;&quot;&gt;&lt;div style=&quot;text-align: right;&quot;&gt;
&lt;span style=&quot;font-size: 12.8000001907349px;&quot;&gt;Selecione e remova itens de modo intuitivo!&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: 12.8000001907349px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
Porém estes controles por padrão permitem a seleção de apenas uma informação, o que em alguns casos não atende aos requisitos do software desenvolvido. Existem na internet diversas empresas e frameworks pagos que possibilitam a customização e/ou adaptação destes controles para que os mesmos permitam a multi-seleção de informações. No entanto, nem sempre os resultados obtidos correspondem ao esperado e a experiência do usuário final é comprometida.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Em meio a minhas pesquisas para o desenvolvimento de uma aplicação  ASP.NET MVC, encontrei o &lt;a href=&quot;http://harvesthq.github.io/chosen/&quot;&gt;Chosen&lt;/a&gt;, um plugin jQuery responsável por permitir esta customização do controle @Html.DropDownList. O plugin conta com diversas opções de customização como: busca, agrupamento, multi-seleção, entre outros.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Os resultados do uso deste plugin são surpreendentes, visto que a customização do controle não apresentam alteração significativa na performance do mesmo quando aplicado sobre pequenas quantidades de dados (ex: 100 registros). Em breve publicarei alguns exemplos de uso prático deste plugin.&lt;/div&gt;
&lt;br /&gt;
Para baixar o plugin, basta acessar &lt;a href=&quot;https://github.com/harvesthq/chosen/releases&quot;&gt;este link&lt;/a&gt;!</content><link rel='replies' type='application/atom+xml' href='http://adotnettalk.blogspot.com/feeds/2146281394520167885/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://adotnettalk.blogspot.com/2015/06/chosen-dropdownlists-multi-selecao.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/2146281394520167885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/2146281394520167885'/><link rel='alternate' type='text/html' href='http://adotnettalk.blogspot.com/2015/06/chosen-dropdownlists-multi-selecao.html' title='Chosen: dropdownlists multi-seleção'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZPDe6ole61CuJDb9F2xUWZZkzx1KHxIxu-Yhcse9_qMCkAV6Zeoj6ZgnLNuvz9D64Gh6hwFekL-01srPj8NIF4vExDGkx1UM-ow7qJGNVz-10tGPIZbW03gIWZm2f8iSrt-4B6hJt5Qk/s72-c/chosen+modelo1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6826107792545068333.post-8667421801633612540</id><published>2015-06-17T21:52:00.000-03:00</published><updated>2015-06-18T17:43:15.318-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Console"/><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><category scheme="http://www.blogger.com/atom/ns#" term="Interop"/><category scheme="http://www.blogger.com/atom/ns#" term="Microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="Password"/><category scheme="http://www.blogger.com/atom/ns#" term="Remove"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>Remover senha  de planilha Excel</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYSX6vTjJGJ9mFZZlR2ee_zE388Nh9K_ZglWonkKvtwIOvN-aIGRn_PV9hBQqpnnsLaWbAPRAVXu2omGRpL6jU56CIIbPiKRZuCkrfphWG8nsd-_bkFlBvSywuGowiJO2YBMRLSmn06kc/s1600/Excel.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYSX6vTjJGJ9mFZZlR2ee_zE388Nh9K_ZglWonkKvtwIOvN-aIGRn_PV9hBQqpnnsLaWbAPRAVXu2omGRpL6jU56CIIbPiKRZuCkrfphWG8nsd-_bkFlBvSywuGowiJO2YBMRLSmn06kc/s1600/Excel.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Recentemente recebi a tarefa de dar manutenção em uma página responsável pelo upload de planilhas Excel. A funcionalidade básica (upload de arquivos) funcionava perfeitamente.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
Entretanto, devido a confidencialidade das informações a serem armazenadas, a partir daquele momento, as mesmas seriam enviadas protegidas por senha. A aplicação anteriormente, utilizava o &lt;a href=&quot;https://www.nuget.org/packages/ClosedXML&quot;&gt;ClosedXML&lt;/a&gt;&amp;nbsp;para efetuar a leitura e manipulação da planilha. Mas, esta API não possuía em sua documentação um método capaz de ler uma planilha criptografada (protegida por senha).&lt;br /&gt;
Na internet existem inúmeras APIs não gratuitas capazes de decriptar/remover senhas de planilhas, porém preferi recorrer a uma API &quot;quase nativa&quot; em ambientes corporativos. A solução foi apelar para o bom e velho &lt;a href=&quot;https://pt.wikipedia.org/wiki/Microsoft_Office&quot;&gt;Office&lt;/a&gt;.&lt;br /&gt;
Ao instalar o Office na máquina, o instalador registra as dlls do mesmo, podendo estas serem importadas e utilizadas no Visual Studio para automatizar operações em documentos.&lt;br /&gt;
Então, em busca de uma solução de menor impacto no algoritmo de importação já existente utilizado pela aplicação, codifiquei o seguinte protótipo, responsável por criar uma cópia do documento importado sem a senha, para que assim, o documento criptografado seja armazenado e o sistema efetue a leitura a partir de uma cópia descriptografada.&lt;br /&gt;
&lt;pre class=&quot;csharp&quot; name=&quot;code&quot;&gt;using Microsoft.Office.Interop.Excel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace Excel.PasswordRemover
{
&amp;nbsp; &amp;nbsp; class Program
&amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static void Main(string[] args)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string password = &quot;12345&quot;;

&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Crio as variáveis com os tipos usando pelo Excel
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Application excel = null;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Workbooks workbooks = null;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Workbook workbook = null;

&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Inicio uma instância do Excel
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; excel = new Application();

&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Inicio os workbooks
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; workbooks = excel.Workbooks;

&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Abro o arquivo passando a senha entre os parâmetros
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; workbook = workbooks.Open(@&quot;C:\Users\bruno\Desktop\plan1.xlsx&quot;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , Type.Missing, Type.Missing, Type.Missing, password, password, Type.Missing
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing
                , Type.Missing);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Desprotejo o documento
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; workbook.Unprotect(password);

&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Limpo as senhas
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; workbook.Password = string.Empty;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; workbook.WritePassword = string.Empty;

&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Salvo uma &quot;cópia&quot; do arquivo sem a senha
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; workbook.SaveAs(@&quot;C:\Users\bruno\Desktop\plan1_no_password.xlsx&quot;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlShared, Type.Missing
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , Type.Missing, Type.Missing, Type.Missing, Type.Missing);

&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; workbook.Close();

&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; excel.Quit();
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch (Exception)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //TODO: Tratar Exceptions
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; finally
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
                //Garanto a finalização da instância do Excel
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Marshal.ReleaseComObject(workbook);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Marshal.ReleaseComObject(workbooks);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Marshal.ReleaseComObject(excel);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; }
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://adotnettalk.blogspot.com/feeds/8667421801633612540/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://adotnettalk.blogspot.com/2015/06/remover-senha-de-planilha-excel.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/8667421801633612540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/8667421801633612540'/><link rel='alternate' type='text/html' href='http://adotnettalk.blogspot.com/2015/06/remover-senha-de-planilha-excel.html' title='Remover senha  de planilha Excel'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYSX6vTjJGJ9mFZZlR2ee_zE388Nh9K_ZglWonkKvtwIOvN-aIGRn_PV9hBQqpnnsLaWbAPRAVXu2omGRpL6jU56CIIbPiKRZuCkrfphWG8nsd-_bkFlBvSywuGowiJO2YBMRLSmn06kc/s72-c/Excel.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6826107792545068333.post-4074145948961310419</id><published>2012-10-21T09:23:00.002-02:00</published><updated>2015-06-19T23:54:17.408-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><category scheme="http://www.blogger.com/atom/ns#" term="Window"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Forms"/><title type='text'>C# Windows Form Anti Flickadas</title><content type='html'>&lt;a href=&quot;https://blogger.googleusercontent.com/img/proxy/AVvXsEgfImq4sHcIvBqAnSvmmlUXlr2KQ6oYBl5WERIJjFwIUZEMl-QHhhMlZKmQAmMZvSh2pA8PpjDQwiXFck67yA0t-VIx7rWfr9NYKuKFCGbSh8rpEyo0dVXi26HKVCUNTzSkdHV7SbsSkFwWHlcppdhDvn6euK1tzvNzNZUq6Ab6zz8sQcr04GhIOX4=&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.codeproject.com/KB/edit/SyntaxRichTextBox/SyntaxRichTextBox.gif&quot; height=&quot;266&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
O componente RichTextBox é um componente muito útil para entrada de texto passíveis de formatação. Com este componente, podemos criar analisadores gramaticais, &amp;nbsp;editores de texto, entre outras finalidades. Através do método Select(), podemos selecionar o texto a ser formatado e aplicar uma diferenciação de fonte, cor e estilo. Porém em textos maiores, o ato de ficar sempre controlando o texto com o uso do método Select a cada entrada no controle, faz com que o mesmo dê algumas flickadas, comportando de maneira estranha a esperada.&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Garimpando na internet, constatei em fórums, se tratar de uma funcionalidade não implementada no controle para controle do redesenho, o que faz com que ele haja desta maneira. Para contornar, encontrei mil e uma maneiras, porém a que me foi mais eficiente, foi a seguinte:&lt;/div&gt;
&lt;br /&gt;
Importar a seguinte dll no código:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;csharp&quot; name=&quot;code&quot;&gt;[DllImport(&quot;user32.dll&quot;)]
public static extern bool LockWindowUpdate(IntPtr hWndLock);

&lt;/pre&gt;
&lt;pre class=&quot;csharp&quot; name=&quot;code&quot;&gt;try
{
      LockWindowUpdate(richTextBox1.Handle);
      //As alterações desejadas vem aqui
}
finally
{
      LockWindowUpdate(IntPtr.Zero);
}
&lt;/pre&gt;

&lt;!-- Blogger automated replacement: &quot;https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2Fwww.codeproject.com%2FKB%2Fedit%2FSyntaxRichTextBox%2FSyntaxRichTextBox.gif&amp;amp;container=blogger&amp;amp;gadget=a&amp;amp;rewriteMime=image%2F*&quot; with &quot;https://blogger.googleusercontent.com/img/proxy/AVvXsEgfImq4sHcIvBqAnSvmmlUXlr2KQ6oYBl5WERIJjFwIUZEMl-QHhhMlZKmQAmMZvSh2pA8PpjDQwiXFck67yA0t-VIx7rWfr9NYKuKFCGbSh8rpEyo0dVXi26HKVCUNTzSkdHV7SbsSkFwWHlcppdhDvn6euK1tzvNzNZUq6Ab6zz8sQcr04GhIOX4=&quot; --&gt;</content><link rel='replies' type='application/atom+xml' href='http://adotnettalk.blogspot.com/feeds/4074145948961310419/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://adotnettalk.blogspot.com/2012/10/c-windows-form-anti-flickadas.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/4074145948961310419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/4074145948961310419'/><link rel='alternate' type='text/html' href='http://adotnettalk.blogspot.com/2012/10/c-windows-form-anti-flickadas.html' title='C# Windows Form Anti Flickadas'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6826107792545068333.post-1328245445958917308</id><published>2012-10-18T18:31:00.002-03:00</published><updated>2015-06-17T22:46:32.510-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="IE"/><category scheme="http://www.blogger.com/atom/ns#" term="Web"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>IE9: Modo compatibilidade</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; height=&quot;234&quot; src=&quot;http://renatotavares.com/wp-content/uploads/2010/10/Download-do-IE9-em-Portugu%C3%AAs-Internet-Explorer-9.jpg&quot; width=&quot;320&quot; /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Uma das premissas a ser levada em consideração na criação e manutenção de aplicações web a compatibilidade. Com os constantes avanços nas linguagens de desenvolvimento web (HTML5, XHTML, CSS3, entre outros), algumas funcionalidades e efeitos visuais tendem a funcionar em determinado navegador e não funcionar em outros.&lt;br /&gt;
No dia a dia, costumo testar minhas aplicações no navegador Internet Explorer 9 e o mesmo possui um ícone próximo à barra de endereços para exibição em modo de compatibilidade.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; src=&quot;http://www.bfinternet.co.uk/news-info/wp-content/uploads/2009/09/ie8_compatibility.jpg&quot; /&gt;&lt;/div&gt;
Porém na manutenção de uma aplicação web em que determinado recurso não funciona corretamente no IE9, ficar clicando neste ícone toda vez que for testar aplicação é na menor das hipóteses uma perda de tempo. Nestes casos, há como deixar o modo de compatibilidade ativo sempre que o navegador abrir. Para isto, basta abrir o IE, clicar em Configuração do Modo de Exibição de Compatibilidade. Lá você tem a opção de definir o endereço a ser acessado neste modo ou definir que todos os sites sejam acessados desta maneira.</content><link rel='replies' type='application/atom+xml' href='http://adotnettalk.blogspot.com/feeds/1328245445958917308/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://adotnettalk.blogspot.com/2012/10/ie9-modo-compatibilidade.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/1328245445958917308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/1328245445958917308'/><link rel='alternate' type='text/html' href='http://adotnettalk.blogspot.com/2012/10/ie9-modo-compatibilidade.html' title='IE9: Modo compatibilidade'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6826107792545068333.post-2850719737500434210</id><published>2012-08-21T21:56:00.001-03:00</published><updated>2015-06-19T23:52:56.791-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="Config"/><category scheme="http://www.blogger.com/atom/ns#" term="IIS"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><category scheme="http://www.blogger.com/atom/ns#" term="WCF"/><category scheme="http://www.blogger.com/atom/ns#" term="Web"/><title type='text'>Problemas com ASP.NET FileUpload</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
Em alguns cenários ao se trabalhar com o componente FileUpload no ASP.NET, revela-se uma caixa de pandora. Uma coisa importante ao se trabalhar com aplicações Web, é desabilitar as mensagens amigáveis de seu IE. Para fazer isso, basta acessar o menu Ferramentas&amp;gt; Opções da Internet&amp;gt; guia Avançadas&amp;gt; nas opções em Navegação, desmarque o checkbox Mostrar mensagens de erro HTTP amigáveis. e em seguida, clique em OK.&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Voltando ao assunto, em alguns momentos, ao selecionar um arquivo para upload e executar qualquer ação/ evento que envolva um postback da página, a aplicação lança um erro. Existem muitas causas para este erro, mas a mais comum, é devido ao tamanho padrão para arquivos no controle.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Ou seja, para corrigir esta deficiência, basta definir no arquivo de configuração da aplicação (web.config) o seguinte nó:&lt;/div&gt;
&lt;/div&gt;
&lt;pre class=&quot;xml&quot; name=&quot;code&quot;&gt;&amp;lt;httpRuntime useFullyQualifiedRedirectUrl=&quot;true|false [para definir se haverá redirecionamento]&quot; maxRequestLength=&quot;[tamanho máximo do arquivo em kbyes]&quot; executionTimeout=&quot;120&quot;/&amp;gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Na maioria dos cenários, esta pequena alteração costuma ser suficiente. Neste nó, outros parâmetros podem ser acrescentados para o controle de fila de requisições e das threads envolvidas.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://adotnettalk.blogspot.com/feeds/2850719737500434210/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://adotnettalk.blogspot.com/2012/08/problemas-com-aspnet-fileupload.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/2850719737500434210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/2850719737500434210'/><link rel='alternate' type='text/html' href='http://adotnettalk.blogspot.com/2012/08/problemas-com-aspnet-fileupload.html' title='Problemas com ASP.NET FileUpload'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6826107792545068333.post-274619002477872590</id><published>2012-08-16T23:55:00.001-03:00</published><updated>2015-06-17T22:41:50.762-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="Banco de Dados"/><category scheme="http://www.blogger.com/atom/ns#" term="Microsoft"/><title type='text'>Found a quote for which there is no matching quote</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
Debugando uma aplicação recentemente, me deparei com um &quot;erro&quot;, no mínimo intrigante. No momento em que a aplicação realizava o acesso à base para realizar uma atualização, ocorria uma exceção com a seguinte descrição:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;text-align: justify;&quot;&gt;
&quot;Found a quote for which there is no matching quote.&quot;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Inicialmente fui até minha consulta para verificar se havia esquecido algum apóstrofo, para minha alegria/desespero, a consulta estava ok.&amp;nbsp;Garimpando&amp;nbsp;na internet, descobri que esse erro, poderia ocorrer caso eu tivesse me esquecido de um apóstrofo ou aspas, ou, se a primeira aspa/apóstrofo estivesse em uma linha diferente da aspa/apóstrofo final. Logo após a leitura,&amp;nbsp;verifiquei que um dos parâmetros a ser persistido na base, possuía um &quot;\n&quot; (quebra de linha). Após remover a quebra de linha, o comando funcionou. Portanto, caso você se depare com este erro, vale a pena rever a documentação de seu sistema de gerenciamento do banco de dados, pois, dependendo do sistema, o tratamento de &quot;novas linhas&quot; pode ser uma configuração a ser desativada/ativada.&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://adotnettalk.blogspot.com/feeds/274619002477872590/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://adotnettalk.blogspot.com/2012/08/found-quote-for-which-there-is-no.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/274619002477872590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/274619002477872590'/><link rel='alternate' type='text/html' href='http://adotnettalk.blogspot.com/2012/08/found-quote-for-which-there-is-no.html' title='Found a quote for which there is no matching quote'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6826107792545068333.post-6790096892556391058</id><published>2012-08-12T12:49:00.000-03:00</published><updated>2015-06-17T22:40:58.184-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="Microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="Testes"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>Introdução ao PSR(Problem Step Recorder)</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
O PSR (Problem Step Recorder), é uma ferramenta desenvolvida pela Microsoft para a exibição de cenários de erros. Por muitas vezes após a etapa de desenvolvimento de um sistema, na etapa de QA(Quality Assurance), alguns erros aparecem em cenários bem específicos, muitas vezes, não descobertos/percebidos ou até mesmo&amp;nbsp;especificados&amp;nbsp;no desenvolvimento. E neste momento, para facilitar a exibição do cenário, é que chega o PSR. Para acessar a ferramenta, pressione (Windows)+R e digite psr.exe.&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirVlkYaPiqpe5SEe_R0qTh-i0_vB4SESi5swvmmjIBkkOm48VnPTJ0xLpkh5tvsbwvmxFvhmC-fQcT1G6t41AxR-XQJcJjfy1oysQX5l_7pA2s8Ykn4N0y42KedhzTZENvAMU5Mva3Vxg/s1600/psr1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;173&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirVlkYaPiqpe5SEe_R0qTh-i0_vB4SESi5swvmmjIBkkOm48VnPTJ0xLpkh5tvsbwvmxFvhmC-fQcT1G6t41AxR-XQJcJjfy1oysQX5l_7pA2s8Ykn4N0y42KedhzTZENvAMU5Mva3Vxg/s320/psr1.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Feito isso, será aberta a seguinte janela:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_kYmc_n72JNtEwNS0rOzwjYwfRHdWNbfZjwHE7RiWdmBETkaC3wvg2JZDLS3EymT25-C0sUHaEIFxUUhaa4W2_jLdAMgCPZukFMRbEdXVA6qJuTHILKK7Wdc-C7bpsvzi7phpYwV5CPY/s1600/psr2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;41&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_kYmc_n72JNtEwNS0rOzwjYwfRHdWNbfZjwHE7RiWdmBETkaC3wvg2JZDLS3EymT25-C0sUHaEIFxUUhaa4W2_jLdAMgCPZukFMRbEdXVA6qJuTHILKK7Wdc-C7bpsvzi7phpYwV5CPY/s320/psr2.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Ao clicar em iniciar gravação, pode-se minimizar a janela e todos os passos executados pelo usuário, serão detalhados. E quando digo todos, me refiro a TODOS! Todas as interações do usuário serão sumarizadas e printadas com a descrição da ação executada. Quando desejar parar, basta abrir a janela minimizada no início do tutorial e clicar em parar. Será gerado um arquivo zip com uma página em &lt;a href=&quot;http://pt.wikipedia.org/wiki/MHTML&quot;&gt;.mht&lt;/a&gt;&amp;nbsp;com todos os passos para a simulação do erro. Espero que tenham gostado e que ajude!&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://adotnettalk.blogspot.com/feeds/6790096892556391058/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://adotnettalk.blogspot.com/2012/08/introducao-ao-psrproblem-step-recorder.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/6790096892556391058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/6790096892556391058'/><link rel='alternate' type='text/html' href='http://adotnettalk.blogspot.com/2012/08/introducao-ao-psrproblem-step-recorder.html' title='Introdução ao PSR(Problem Step Recorder)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirVlkYaPiqpe5SEe_R0qTh-i0_vB4SESi5swvmmjIBkkOm48VnPTJ0xLpkh5tvsbwvmxFvhmC-fQcT1G6t41AxR-XQJcJjfy1oysQX5l_7pA2s8Ykn4N0y42KedhzTZENvAMU5Mva3Vxg/s72-c/psr1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6826107792545068333.post-3192161958119692629</id><published>2012-08-05T11:28:00.003-03:00</published><updated>2015-06-17T22:39:21.898-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><title type='text'>Controlando Exceções</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
Em alguns momentos debugando algumas aplicações, nos deparamos com determinadas exceções que acabam nos atrapalhando, pois não é algo que  se trate de um erro, mas sim um aviso da plataforma. Recentemente, me deparei com uma exception que me impedia de continar a depuração de uma rotina e a seguinte mensagem era exibida:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;text-align: justify;&quot;&gt;
ContextSwitchDeadlock was detectedMessage: The CLR has been unable to transition from COM context 0x16a300 to COM context 0x16a020 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.&lt;/blockquote&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
No Visual Studio 2010, há como controlar as exceptions a serem lançadas. No meu caso, esta mensagem tratava-se de um MDA (Managed Debugging Assistants). Para controlar algumas exceptions lançadas pela IDE, basta acessar o menu Debug-&amp;gt;Exceptions &amp;gt; MDA e habilitar/desabilitar os check boxes.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://adotnettalk.blogspot.com/feeds/3192161958119692629/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://adotnettalk.blogspot.com/2012/08/controlando-excecoes.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/3192161958119692629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/3192161958119692629'/><link rel='alternate' type='text/html' href='http://adotnettalk.blogspot.com/2012/08/controlando-excecoes.html' title='Controlando Exceções'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6826107792545068333.post-7314669860902540357</id><published>2012-02-27T21:49:00.000-03:00</published><updated>2015-06-19T23:51:46.540-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="Web"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>Armazenando configurações nos Gadgets / Side bar Gadgets Windows Vista/Windows 7</title><content type='html'>&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlJ8ohPbQOAEFh1AC3WmLOYZHck9M0ikhOwhbeyzGcD0RNIzAhrKnVECwfNiPiSB4bkUOwJ53wRjae78uXdriOiD18fOUHWhjD_FZhD7aFuH5MHB_SU_BUheQu2rAxXNmGBU0sRoi4rx0/s1600/win7_ff_gadgets_04.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;156&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlJ8ohPbQOAEFh1AC3WmLOYZHck9M0ikhOwhbeyzGcD0RNIzAhrKnVECwfNiPiSB4bkUOwJ53wRjae78uXdriOiD18fOUHWhjD_FZhD7aFuH5MHB_SU_BUheQu2rAxXNmGBU0sRoi4rx0/s320/win7_ff_gadgets_04.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
O que acho interessante nas tecnologias, é o como elas se cruzam e muitas vezes se completam. Os tão aclamados gadgets, foram uma das grandes novidades da Microsoft em aplicações, pois estes nada mais são do que páginas da web. Porém, em muitos sites na internet, como fórums e grupos de discussão, em diversas línguas, reside uma única dúvida.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
Como armazenar as configurações parametrizadas pelo usuário em um Gadget, ou, side bar gadgets como descobri recentemente?&amp;nbsp; &lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Despois de árduas horas de pesquisa, encontrei em apenas um site uma solução definitiva. Portanto, o conteúdo deste post, nada mais é do que a multiplicação do conhecimento, pois, quanto mais conteúdo de um determinado assunto ou tecnologia fica disponível na internet, mais fácil a solução para determinados problemas será encontrada.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Nativamente, os Gadgets recorrem aos métodos&amp;nbsp; System.Gadget.Settings.read(&quot;parametroChave&quot;) e System.Gadget.Settings.readString(&quot;parametroChave&quot;) para ler valores de configurações relacionados à chave informada e os métodos&amp;nbsp;System.Gadget.Settings.write(&quot;parametroChave&quot;, &quot;valor&quot;) e System.Gadget.Settings.writeString(&quot;parametroChave&quot;, &quot;valor&quot;).&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
E aí me veio a seguinte pergunta, e esta pode ser a sua neste momento. Qual a diferença entre writeString e write? A resposta é bem simples, ao chamar o writeString, o valor será armazenado no formato string. E qual a utilidade? Em caso de números com maior precisão, é recomendável armazená-los em String para evitar um arredondadmento, visto que usando write, deixamos a cargo do sistema, a interpretação do tipo de dados a ser gravado (o que em alguns casos, resulta em um truncamento ou perca de precisão). E feito a gravação, aonde encontro as informações gravadas?&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
As informação dos Gadgets em execução, geralmente podem ser encontradas no seguinte caminho:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
C:\Users\&lt;i&gt;Nome_de_Usuário&lt;/i&gt;\AppData\Local\Microsoft\Windows Sidebar&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Nesta pasta, encontramos geralmente, um arquivo chamado &lt;i&gt;Settings&lt;/i&gt; e uma pasta chamada &lt;i&gt;Gadgets&lt;/i&gt;. No arquivo Settings.ini, ficam armazenadas todas as informações referentes as instâncias dos Gadgets em execução no Windows, como sua localização na tela entre outros. Ou seja, toda e qualquer alteração em um Gadget, resulta na atualização deste arquivo.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Partindo deste conhecimento, uma biblioteca JavaScript muito útil é o SettingsManager. Importando esta biblioteca, temos acesso aos seguintes métodos:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
SettingsManager.loadFile() e SettingsManager.saveFile().&lt;span class=&quot;content&quot;&gt;&lt;span class=&quot;block&quot; style=&quot;margin-left: 0px ! important;&quot;&gt;&lt;code class=&quot;plain&quot;&gt;&lt;br /&gt;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Segue abaixo um exemplo do uso desta biblioteca:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
O método SettingsManager.loadFile(), carrega todas as configurações do arquivo Settings.ini localizado na pasta raíz do Gadget em memória.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Com o método SettingsManager.setValue(&quot;nome_grupo_config&quot;,&quot;chave&quot;, &quot;valor&quot;),&amp;nbsp; armazenamos em memória um valor associado a uma chave, pertencente a um grupo de configurações (o nome do grupo não faz muita diferença). &lt;b style=&quot;color: red;&quot;&gt;&lt;u&gt;É importante ressaltar que até o momento, nada foi escrito no arquivo&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
SettingsManager.getValue(&quot;nome_grupo_config&quot;,&quot;chave&quot;, valorPadrão), obtem da memória, um valor associado a uma chave, pertencente a um grupo de configurações, caso não seja possível obter este valor, será retornado o valor padrão.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
O método SettingsManager.saveFile(), armazena todas as informações carregadas em memória em um arquivo Settings.ini (nome definido por padrão). Caso o arquivo não exista, ele é automaticamente criado.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
E assim, independente de o computador ser reiniciado, desligado, ou o gadget fechado, todas as configurações permanecem salvas. Para maiores informações, segue o link original&lt;/div&gt;
&lt;br /&gt;
Fonte: &lt;a href=&quot;http://dotnetslackers.com/articles/net/SettingsManagerforWindowsVistaSidebarGadgets.aspx&quot; target=&quot;_blank&quot;&gt;Settings Manager for Windows Vista Sidebar Gadgets&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://adotnettalk.blogspot.com/feeds/7314669860902540357/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://adotnettalk.blogspot.com/2012/02/armazenando-configuracoes-nos-gadgets.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/7314669860902540357'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/7314669860902540357'/><link rel='alternate' type='text/html' href='http://adotnettalk.blogspot.com/2012/02/armazenando-configuracoes-nos-gadgets.html' title='Armazenando configurações nos Gadgets / Side bar Gadgets Windows Vista/Windows 7'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlJ8ohPbQOAEFh1AC3WmLOYZHck9M0ikhOwhbeyzGcD0RNIzAhrKnVECwfNiPiSB4bkUOwJ53wRjae78uXdriOiD18fOUHWhjD_FZhD7aFuH5MHB_SU_BUheQu2rAxXNmGBU0sRoi4rx0/s72-c/win7_ff_gadgets_04.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6826107792545068333.post-1835713429690284313</id><published>2012-02-21T00:54:00.000-02:00</published><updated>2015-06-19T23:49:17.421-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="Console"/><category scheme="http://www.blogger.com/atom/ns#" term="IIS"/><category scheme="http://www.blogger.com/atom/ns#" term="WCF"/><title type='text'>Criando, Hospedando e Consumindo um WCF Service</title><content type='html'>Neste tutorial, utilizei o Visual Studio 2010, IIS 7.0 e um navegador para vizualisar o conteúdo hospedado.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz0m8uc9hvK12gQUiFWfqPTldy_HcAMdCP33aLeDqubPgO9hLgVfUkHge0NhiVaXBYV5BEIxtFc9pUIv3FzP41epBpoBpdVHA16Cxgdar3HHuOdkc6LKqpAW6EfzYXH48yHn7fzGnAalc/s1600/screenshot001.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;388&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz0m8uc9hvK12gQUiFWfqPTldy_HcAMdCP33aLeDqubPgO9hLgVfUkHge0NhiVaXBYV5BEIxtFc9pUIv3FzP41epBpoBpdVHA16Cxgdar3HHuOdkc6LKqpAW6EfzYXH48yHn7fzGnAalc/s640/screenshot001.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
O projeto é um exemplo muito simples de uma calculadora, onde os métodos são expostos pelo serviço e consumidos por um client.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Iniciamos criando o projeto WCF que será o portador dos métodos do serviço a serem consumidos:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
File&amp;gt;New Project&amp;gt;WCF&amp;gt;WCF Service Application&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span id=&quot;goog_614236209&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_614236210&quot;&gt;&lt;/span&gt;Neste projeto iremos editar&amp;nbsp; os arquivos Service1.svc.cs e o IService.cs (A interface (Service Contract), responsável por definir quais os métodos(Operation Contracts) a serem expostos pelo serviço.&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXL1I0isEVXGzekVkJf1Bl_JThAEtO7OXM0oCcq0qA5rKllsUTWSU2U4FjgFM3ZpcSN_SLVtr2oOl4e6_LLthe5QBbE3FIIm9ScNTKwyDCky2NxPNmUSX5A2cZzgQJXt8zXhfLuLmVSBA/s1600/screenshot004.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;356&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXL1I0isEVXGzekVkJf1Bl_JThAEtO7OXM0oCcq0qA5rKllsUTWSU2U4FjgFM3ZpcSN_SLVtr2oOl4e6_LLthe5QBbE3FIIm9ScNTKwyDCky2NxPNmUSX5A2cZzgQJXt8zXhfLuLmVSBA/s640/screenshot004.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc5DmUNKfo2YlNwDwCPcS5YsnUK6ME0UdA29vY-xSa7qCPj1BpUMNEdxysIKf3WPGJ53pkaCoaKehPvK2dj-iNghidZzNbXkrFLdTNn0J9KgO6igU3CIAS36lycEZsLro4MEDrfIkWhFs/s1600/screenshot005.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;356&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc5DmUNKfo2YlNwDwCPcS5YsnUK6ME0UdA29vY-xSa7qCPj1BpUMNEdxysIKf3WPGJ53pkaCoaKehPvK2dj-iNghidZzNbXkrFLdTNn0J9KgO6igU3CIAS36lycEZsLro4MEDrfIkWhFs/s640/screenshot005.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Após editar os arquivos, é interessante compilarmos a solução para garantir que a mesma está funcionando corretamente.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Feito isso, clique com o botão direito no projeto WCF&amp;gt;Build Deployment Package. Com isto, o Visual Studio irá gerar um pacote na pasta obj&amp;gt;package pronto para ser publicado no IIS.&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRBGHgAx7WyqMPMIxRRHVF4By6EbvU4mQEJZC0bQqUlRPjdxTk1vHtANTcoTorJ64hPGomPShBnuWwD7O86HF2TBbB8vflI0Iyu5MS_0kXV4jfwp0OVF8GI3ww0YnG6MYdwjE8xxvNWM4/s1600/screenshot010.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;534&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRBGHgAx7WyqMPMIxRRHVF4By6EbvU4mQEJZC0bQqUlRPjdxTk1vHtANTcoTorJ64hPGomPShBnuWwD7O86HF2TBbB8vflI0Iyu5MS_0kXV4jfwp0OVF8GI3ww0YnG6MYdwjE8xxvNWM4/s640/screenshot010.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Agora, para que o serviço seja acessível, é necessário que ele rode em algum lugar. Neste post, usaremos o IIS para hospedar o serviço.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGQQ8pQWevRKjg8276SadDOnPfEUJKai319_S7cQljMPq9oXc_GOnazEwMLzBJCacj9dPkeHQNIF9cuvEZ5F9NZJ3Abavo2_2RHY6ZBq4y_ipX1TwKEXhiuovdc4msdu8jdSvBMV6-Sxs/s1600/screenshot011.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;305&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGQQ8pQWevRKjg8276SadDOnPfEUJKai319_S7cQljMPq9oXc_GOnazEwMLzBJCacj9dPkeHQNIF9cuvEZ5F9NZJ3Abavo2_2RHY6ZBq4y_ipX1TwKEXhiuovdc4msdu8jdSvBMV6-Sxs/s640/screenshot011.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Com o IIS aberto, clique com o botão direito no site que hospedará a aplicação&amp;gt;Implantar&amp;gt;Importar Aplicativo. Em algumas versões dependendo do idioma, o termo implantar, pode aparecer como deploy.&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6uFrGXZ4Hm9mpbSO1JutrgmXKG6YY0MA5czOGbrHfkleOatd1kLe5gVBN-nNUj0Kvks1LmP8NGqCYS-77-MwDwF_30xFDMGbyzzdfAQLy85EZp7IL3Lvy0-ghq5EuVTr5ECW6lJDCgBs/s1600/screenshot013.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;482&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6uFrGXZ4Hm9mpbSO1JutrgmXKG6YY0MA5czOGbrHfkleOatd1kLe5gVBN-nNUj0Kvks1LmP8NGqCYS-77-MwDwF_30xFDMGbyzzdfAQLy85EZp7IL3Lvy0-ghq5EuVTr5ECW6lJDCgBs/s640/screenshot013.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Será exibida a seguinte janela onde apontaremos para nosso pacote gerado anteriormente na pasta obj&amp;gt;package.&lt;br /&gt;
&lt;br /&gt;
Clique em avançar. Serão exibidos os conteúdo que o pacote contém e que serão implantados.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKRKy0eiD4dEqjg0wgEPzraIuhVwaY0JjaR1zNRwLHHUJLrFPRKWdFItp93-m1FpUeawp_MdjcvZLEmbbKDEtsiI7ZIyNy1-ZDq8M4aQAsHlzb_ltZU8pd5-LYwwXKoBK6j2nywdA1VEo/s1600/screenshot014.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;482&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKRKy0eiD4dEqjg0wgEPzraIuhVwaY0JjaR1zNRwLHHUJLrFPRKWdFItp93-m1FpUeawp_MdjcvZLEmbbKDEtsiI7ZIyNy1-ZDq8M4aQAsHlzb_ltZU8pd5-LYwwXKoBK6j2nywdA1VEo/s640/screenshot014.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Em seguida, será exibida uma tela onde podemos personalizar o &quot;alias&quot;, ou nome da aplicação no site.&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZE5WOsvP1KtIcCE597v5ReICJZ1Y0pnQf2bxDHLvdnxHe9MJqK4stD57QtCe3HknfmWo3_wrisS-RW2a8CTvtmPVUn0p0b2DgR6tU_ZO5C1mHi3CJtspgKqc0rW-xBf8ShVp_rAligrs/s1600/screenshot015.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;482&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZE5WOsvP1KtIcCE597v5ReICJZ1Y0pnQf2bxDHLvdnxHe9MJqK4stD57QtCe3HknfmWo3_wrisS-RW2a8CTvtmPVUn0p0b2DgR6tU_ZO5C1mHi3CJtspgKqc0rW-xBf8ShVp_rAligrs/s640/screenshot015.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Após definir um nome, clique em avançar e em seguida, concluir. Após isso, nossa aplicação teoricamente, deveria estar no ar. Para confirmar, basta abrir um navegador e digitar o &lt;b&gt;&lt;u&gt;endereço da máquina que hospedou a aplicação /(barra)nome da aplicação&lt;/u&gt;&lt;/b&gt;.&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrGzB3bwto4bxtIXHyG1c0dqmA9AKjRF5OooDuHLPSamILJrRHiib2fLiIAWHiW3U_URbiEDDOv3zQRKp2uCYQrqUckKp3wrVa-t_yBV4s6Lf5Pmnl5MSaYmLK1vxOXFCMxRHGibLEegs/s1600/screenshot017.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;344&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrGzB3bwto4bxtIXHyG1c0dqmA9AKjRF5OooDuHLPSamILJrRHiib2fLiIAWHiW3U_URbiEDDOv3zQRKp2uCYQrqUckKp3wrVa-t_yBV4s6Lf5Pmnl5MSaYmLK1vxOXFCMxRHGibLEegs/s640/screenshot017.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Se você obtiver um resultado igual a este, ou, parecido com este, sua aplicação está no ar.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Agora, criaremos uma aplicação do tipo Console, apenas para consumir o serviço e trazer o resultado.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Abrimos um novo projeto no Visual Studio: File&amp;gt;New&amp;gt;Project&amp;gt;Windows&amp;gt;Console Application&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Para consumirmos um serviço, é necessário adicinar uma referência ao mesmo. Portanto, clicamos com o botão direito no projeto&amp;gt;Add Service Reference. Será exibida a seguinte janela:&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2FehDnrCztQnIeD2PBURtvao6M9tRWzgqZ0aEMyY_Jo8pIubGk1vffez8-u0350-GVxZlKJZZsOmGzKCNJNKFZDqwe6sHx9rtAh1GTYPj75X6yntI7COv5ZzyrtrUa7g3qDHWRXgrgW0/s1600/screenshot023.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;516&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2FehDnrCztQnIeD2PBURtvao6M9tRWzgqZ0aEMyY_Jo8pIubGk1vffez8-u0350-GVxZlKJZZsOmGzKCNJNKFZDqwe6sHx9rtAh1GTYPj75X6yntI7COv5ZzyrtrUa7g3qDHWRXgrgW0/s640/screenshot023.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgu_UFHyCObb6Py8KwNjbt18C1BPpg9fY-GVNyFHSfXDpW-kZrpZUp092c79fLq0Q9q8EOVrTSrj3Pfc-uHwCkpUzsa7t1lAU_PtjzmODD-kDmvEP1Y3TDcGKXiWr3huyfWfy_skMHIzZs/s1600/screenshot021.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Caso seu projeto WCF, Esteja na mesma solução do projeto Console, basta clicar no botão Discover e o serviço aparecerá na relação Services. Seguindo a idéia do post, inserimos o mesmo endereço utilizado no browser, apontando para o arquivo &quot;.svc&quot; e ao clicarmos em GO, será encontrado o serviço hospedado no IIS. Ainda na mesma janela, acessando a interface, vemos os métodos expostos pelo serviço. No campo inferior &quot;Namespace&quot; podemos definir o nome para identificação do serviço.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Após editarmos estas informações, basta clicar em OK.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl549NgVn2pKkcgHQrZ_A9e0CqK1pm1I9nHcY4JD5Ck1MQhBXcn8SFAd_uXaIEPBHo2TrExPWTfBmOyc_Xdjc3rAIWkZKvX4EYMny5RG6ksMKs5cyPCPvrcuxaI-vWu_rP8bb-Q6xn0QI/s1600/screenshot027.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;344&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl549NgVn2pKkcgHQrZ_A9e0CqK1pm1I9nHcY4JD5Ck1MQhBXcn8SFAd_uXaIEPBHo2TrExPWTfBmOyc_Xdjc3rAIWkZKvX4EYMny5RG6ksMKs5cyPCPvrcuxaI-vWu_rP8bb-Q6xn0QI/s640/screenshot027.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Com isto já possuímos a referência de serviço em nosso projeto console para consumirmos o serviço própriamente dito.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Para consumirmos o serviço, basta instanciarmos um objeto client e a partir dele, efetuar a chamada dos métodos. Em meu teste, chamo a função Calculate passando dois valores decimais e a operação soma.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
É uma boa prática, fecharmos a conexão com o serviço após as operações. Ao rodar o código acima, obtive o seguinte resultado:&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaPMn11z2VNwrfmhg2PwuxFWzRKVfDNEd6Y-ZFwUFSxyIWGxuCfIS4Z43DHb5T9sJVCHWefjNW54asy9PyFCfRmKp9-w7zunLoEC8WbGWWdHBNKOHzb1hA7nUkbkWe7S496btn8cIx1zA/s1600/screenshot026.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;322&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaPMn11z2VNwrfmhg2PwuxFWzRKVfDNEd6Y-ZFwUFSxyIWGxuCfIS4Z43DHb5T9sJVCHWefjNW54asy9PyFCfRmKp9-w7zunLoEC8WbGWWdHBNKOHzb1hA7nUkbkWe7S496btn8cIx1zA/s640/screenshot026.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Simples não? Nos vemos nos próximos posts! =)&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Qualquer dúvida, crítica ou sugestão, sintam-se livres em comentar!&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://adotnettalk.blogspot.com/feeds/1835713429690284313/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://adotnettalk.blogspot.com/2012/02/criando-hospedando-e-consumindo-um-wcf.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/1835713429690284313'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/1835713429690284313'/><link rel='alternate' type='text/html' href='http://adotnettalk.blogspot.com/2012/02/criando-hospedando-e-consumindo-um-wcf.html' title='Criando, Hospedando e Consumindo um WCF Service'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz0m8uc9hvK12gQUiFWfqPTldy_HcAMdCP33aLeDqubPgO9hLgVfUkHge0NhiVaXBYV5BEIxtFc9pUIv3FzP41epBpoBpdVHA16Cxgdar3HHuOdkc6LKqpAW6EfzYXH48yHn7fzGnAalc/s72-c/screenshot001.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6826107792545068333.post-4878038851854452738</id><published>2012-02-17T22:51:00.001-02:00</published><updated>2015-06-19T23:47:40.361-03:00</updated><title type='text'>Apresentação</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
Meu nome é Bruno, atuo na área de desenvolvimento em .NET com ênfase em C# e ASP.NET entre outros a quase um ano. No momento estou cursando a graduação em Desenvolvimento de Jogos Digitais na FATEC de Carapicuíba. Este blog tem a simples e única finalidade de contribuir na disseminação de conhecimentos das tecnologias de desenvolvimento Microsoft. Todos os comentários e sugestões são bem vindos.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://adotnettalk.blogspot.com/feeds/4878038851854452738/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://adotnettalk.blogspot.com/2012/02/apresentacao.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/4878038851854452738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6826107792545068333/posts/default/4878038851854452738'/><link rel='alternate' type='text/html' href='http://adotnettalk.blogspot.com/2012/02/apresentacao.html' title='Apresentação'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>