<?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-7546612190200798759</id><updated>2024-09-08T08:16:05.757-07:00</updated><category term="C#"/><category term="sql"/><category term="SignalR"/><category term="asp.net"/><category term="@helper"/><category term="Class"/><category term="Object"/><category term="algorithm"/><category term="bubble sort"/><category term="datatable"/><category term="datetime"/><category term="dns"/><category term="entityframework"/><category term="hosting"/><category term="iis"/><category term="jquery"/><category term="list to datatable"/><category term="mail configuration"/><category term="mssql"/><category term="mvc"/><category term="mx record"/><category term="razor"/><category term="rdbms"/><category term="read from a file"/><category term="recursion"/><category term="sql permission"/><category term="sql server"/><category term="sqlexception"/><category term="ssms"/><category term="streamreader"/><category term="streamwriter"/><category term="update column from another table"/><category term="update in sql"/><category term="weekofday"/><category term="windows server"/><category term="windows service"/><category term="wirte to a file"/><title type='text'>Lets start with sharing</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mesushil.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://mesushil.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Sushil Sapkota</name><uri>http://www.blogger.com/profile/07245946363540402303</uri><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>29</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7546612190200798759.post-5454396790082437413</id><published>2019-11-23T18:54:00.001-08:00</published><updated>2019-11-23T18:54:48.428-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="datatable"/><category scheme="http://www.blogger.com/atom/ns#" term="list to datatable"/><title type='text'>Converting List to DataTable in C#</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
public static DataTable ConvertToDataTable&amp;lt;T&amp;gt;(IList&amp;lt;T&amp;gt; data)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PropertyDescriptorCollection properties =&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TypeDescriptor.GetProperties(typeof(T));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataTable table = new DataTable();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (PropertyDescriptor prop in properties)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; table.Columns.Add(prop.Name, Nullable.GetUnderlyingType(prop.PropertyType) ?? prop.PropertyType);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (T item in data)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataRow row = table.NewRow();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (PropertyDescriptor prop in properties)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; row[prop.Name] = prop.GetValue(item) ?? DBNull.Value;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; table.Rows.Add(row);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return table;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mesushil.blogspot.com/feeds/5454396790082437413/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mesushil.blogspot.com/2019/11/converting-list-to-datatable-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/5454396790082437413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/5454396790082437413'/><link rel='alternate' type='text/html' href='http://mesushil.blogspot.com/2019/11/converting-list-to-datatable-in-c.html' title='Converting List to DataTable in C#'/><author><name>Sushil Sapkota</name><uri>http://www.blogger.com/profile/07245946363540402303</uri><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-7546612190200798759.post-9054920502944785592</id><published>2019-04-24T04:00:00.000-07:00</published><updated>2019-04-24T04:08:17.597-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="entityframework"/><title type='text'>Introduction to Entity Framework</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;background-color: white; color: #181717; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;geneva&amp;quot; , sans-serif; font-size: 16px; text-align: justify;&quot;&gt;Entity Framework is an object-relational mapper (O/RM) that enables .NET developers to work with a database using .NET objects. It eliminates the need for most of the data-access code that developers usually need to write.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #181717; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;geneva&amp;quot; , sans-serif; font-size: 16px; text-align: justify;&quot;&gt;&lt;br /&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/AVvXsEiaJIFtQ9Uc71xXw9wU12IEyk6MDGJLdBiq31i9ltLerlS809sxl_8Cr6ktxyhimUS8kVdgk2Y1tice05LxdXl9p9oV3ZVr7PFm-0phC9DxQ5QxE-Kaj0NH9vnjCYrCYMZes8iJwKVNLU0/s1600/ef-in-app-architecture.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;405&quot; data-original-width=&quot;334&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaJIFtQ9Uc71xXw9wU12IEyk6MDGJLdBiq31i9ltLerlS809sxl_8Cr6ktxyhimUS8kVdgk2Y1tice05LxdXl9p9oV3ZVr7PFm-0phC9DxQ5QxE-Kaj0NH9vnjCYrCYMZes8iJwKVNLU0/s320/ef-in-app-architecture.png&quot; width=&quot;263&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #181717; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;geneva&amp;quot; , sans-serif; font-size: 16px; text-align: justify;&quot;&gt;&amp;nbsp;It enables developers to work with data using objects of domain specific classes without focusing on the underlying database tables and columns where this data is stored.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #181717; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;geneva&amp;quot; , sans-serif;&quot;&gt;It eliminates&amp;nbsp;the&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #181717; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;geneva&amp;quot; , sans-serif; font-size: 16px; text-align: justify;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #181717; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;geneva&amp;quot; , sans-serif; font-size: 16px; text-align: justify;&quot;&gt;ADO.NET code that we write to connect to Database,Execute Query and read data from DataSet and convert to .net objects and vice versa.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #181717; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;geneva&amp;quot; , sans-serif; font-size: 16px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #181717; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;geneva&amp;quot; , sans-serif;&quot;&gt;It Reduces the pain of developers and provides higher level of abstraction for faster development of .net applications.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mesushil.blogspot.com/feeds/9054920502944785592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mesushil.blogspot.com/2019/04/introduction-to-entity-framework.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/9054920502944785592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/9054920502944785592'/><link rel='alternate' type='text/html' href='http://mesushil.blogspot.com/2019/04/introduction-to-entity-framework.html' title='Introduction to Entity Framework'/><author><name>Sushil Sapkota</name><uri>http://www.blogger.com/profile/07245946363540402303</uri><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/AVvXsEiaJIFtQ9Uc71xXw9wU12IEyk6MDGJLdBiq31i9ltLerlS809sxl_8Cr6ktxyhimUS8kVdgk2Y1tice05LxdXl9p9oV3ZVr7PFm-0phC9DxQ5QxE-Kaj0NH9vnjCYrCYMZes8iJwKVNLU0/s72-c/ef-in-app-architecture.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7546612190200798759.post-3166485978559735435</id><published>2019-04-21T20:34:00.001-07:00</published><updated>2019-04-21T20:34:06.484-07:00</updated><title type='text'>Adding User To Role Using Identity</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
First Create a viewmodel&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;public class ApplicationUserRoleViewModel&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string UserId { get; set; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string RoleId { get; set; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
Create an Empty Controller with name UserAndRolesConroller and add the following actions&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; public async Task&amp;lt;ActionResult&amp;gt; AddUserToRole()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ApplicationUserRoleViewModel vm = new ApplicationUserRoleViewModel();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var Users = await dbCon.Users.ToListAsync();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var roles = await dbCon.Roles.ToListAsync();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ViewBag.UserId = new SelectList(Users, &quot;Id&quot;, &quot;UserName&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ViewBag.RoleId = new SelectList(roles, &quot;Id&quot;, &quot;Name&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return View(vm);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [HttpPost]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public async Task&amp;lt;ActionResult&amp;gt; AddUserToRole(ApplicationUserRoleViewModel model)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var role = dbCon.Roles.Find(model.RoleId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (role != null)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; await UserManager.AddToRoleAsync(model.UserId, role.Name);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return RedirectToAction(&quot;AddUserToRole&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Create a view by clicking in the action and giving the same name&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
@model WebApplication1.Models.ApplicationUserRoleViewModel&lt;/div&gt;
&lt;div&gt;
@{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; ViewBag.Title = &quot;AddUserToRole&quot;;&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;h2&amp;gt;AddUserToRole&amp;lt;/h2&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
@using (Html.BeginForm())&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; @Html.AntiForgeryToken()&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;div class=&quot;form-horizontal&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;h4&amp;gt;Attendance&amp;lt;/h4&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;hr /&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div class=&quot;form-group&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.Label(&quot;UserId&quot;, htmlAttributes: new { @class = &quot;control-label col-md-2&quot; })&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div class=&quot;col-md-10&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.DropDownListFor(model =&amp;gt; model.UserId, null, htmlAttributes: new { @class = &quot;form-control&quot; })&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div class=&quot;form-group&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.Label(&quot;RoleId&quot;, htmlAttributes: new { @class = &quot;control-label col-md-2&quot; })&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div class=&quot;col-md-10&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.DropDownListFor(model =&amp;gt; model.RoleId, null, htmlAttributes: new { @class = &quot;form-control&quot; })&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div class=&quot;form-group&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div class=&quot;col-md-offset-2 col-md-10&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;input type=&quot;submit&quot; value=&quot;Create&quot; class=&quot;btn btn-default&quot; /&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mesushil.blogspot.com/feeds/3166485978559735435/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mesushil.blogspot.com/2019/04/adding-user-to-role-using-identity.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/3166485978559735435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/3166485978559735435'/><link rel='alternate' type='text/html' href='http://mesushil.blogspot.com/2019/04/adding-user-to-role-using-identity.html' title='Adding User To Role Using Identity'/><author><name>Sushil Sapkota</name><uri>http://www.blogger.com/profile/07245946363540402303</uri><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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7546612190200798759.post-3526052150252928215</id><published>2019-04-20T20:29:00.001-07:00</published><updated>2019-04-20T20:29:30.675-07:00</updated><title type='text'>Converting DataTable to List</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Calling from Controller&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;public ActionResult Index()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //join use&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //change view model.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String sql = &quot;SELECT * FROM faculties &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; db.List(sql);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var dt = db.List(sql);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var model = new Faculty().List(dt);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return View(model);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Add a method to class&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
List&amp;lt;Faculty&amp;gt; list = new List&amp;lt;Faculty&amp;gt;();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public List&amp;lt;Faculty&amp;gt; List(DataTable dt)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 0; i &amp;lt; dt.Rows.Count; i++)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Faculty fac = new Faculty();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fac.FacultyId = Convert.ToInt32(dt.Rows[i][&quot;FacultyId&quot;]);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fac.Name = dt.Rows[i][&quot;Name&quot;].ToString();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fac.Description = dt.Rows[i][&quot;Description&quot;].ToString();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; list.Add(fac);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return list;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mesushil.blogspot.com/feeds/3526052150252928215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mesushil.blogspot.com/2019/04/converting-datatable-to-list.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/3526052150252928215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/3526052150252928215'/><link rel='alternate' type='text/html' href='http://mesushil.blogspot.com/2019/04/converting-datatable-to-list.html' title='Converting DataTable to List'/><author><name>Sushil Sapkota</name><uri>http://www.blogger.com/profile/07245946363540402303</uri><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-7546612190200798759.post-621562307608013783</id><published>2019-04-20T20:25:00.003-07:00</published><updated>2019-04-20T20:25:39.404-07:00</updated><title type='text'>Using SqlDataAdapter to fill DataTable in c#</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
public DataTable List(string sql)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings[&quot;DefaultConnection&quot;].ConnectionString);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SqlCommand cmd = new SqlCommand(sql, con);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataTable dt = new DataTable();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SqlDataAdapter da = new SqlDataAdapter(cmd);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try&lt;br /&gt;
&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; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; con.Open();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; da.Fill(dt);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; finally&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; con.Close();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return dt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mesushil.blogspot.com/feeds/621562307608013783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mesushil.blogspot.com/2019/04/using-sqldataadapter-to-fill-datatable.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/621562307608013783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/621562307608013783'/><link rel='alternate' type='text/html' href='http://mesushil.blogspot.com/2019/04/using-sqldataadapter-to-fill-datatable.html' title='Using SqlDataAdapter to fill DataTable in c#'/><author><name>Sushil Sapkota</name><uri>http://www.blogger.com/profile/07245946363540402303</uri><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-7546612190200798759.post-759421935757780998</id><published>2019-03-23T08:35:00.002-07:00</published><updated>2019-03-23T08:35:40.298-07:00</updated><title type='text'>Connection String in ASP.NET With SQL Server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Connection string can be placed in web.config file found in root directory of the application from .NET 3.5 onward.&lt;br /&gt;
connection string can be specified with an xml tag&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;background-color: #eff0f1; border: 0px; box-sizing: inherit; color: #7d2727; font-family: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&amp;lt;connectionStrings&amp;gt;&amp;nbsp;&lt;/span&gt;inside&amp;nbsp;&lt;span style=&quot;background-color: #eff0f1; color: #7d2727; font-family: inherit; font-size: 13px; font-style: inherit; font-variant-caps: inherit; font-variant-ligatures: inherit; font-weight: inherit; white-space: inherit;&quot;&gt;&amp;lt;configuration&amp;gt;&amp;nbsp;&lt;/span&gt;section of web.config file.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;tag&quot; style=&quot;color: blue; font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Monaco, monospace; font-size: 15.3px; margin: 0px; padding: 0px; white-space: pre;&quot;&gt;&amp;lt;&lt;span class=&quot;title&quot; style=&quot;color: #a31515; margin: 0px; padding: 0px;&quot;&gt;connectionStrings&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: #eeeeee; font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Monaco, monospace; font-size: 15.3px; white-space: pre;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: blue; font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Monaco, monospace; font-size: 15.3px; margin: 0px; padding: 0px; white-space: pre;&quot;&gt;&amp;lt;&lt;span class=&quot;title&quot; style=&quot;color: #a31515; margin: 0px; padding: 0px;&quot;&gt;add&lt;/span&gt; &lt;span class=&quot;attribute&quot; style=&quot;color: red; margin: 0px; padding: 0px;&quot;&gt;name&lt;/span&gt;=&lt;span class=&quot;value&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&quot;myConnectionString&quot;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;tag&quot; style=&quot;color: blue; font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Monaco, monospace; font-size: 15.3px; margin: 0px; padding: 0px; white-space: pre;&quot;&gt;&lt;span class=&quot;attribute&quot; style=&quot;color: red; margin: 0px; padding: 0px;&quot;&gt;     connectionString&lt;/span&gt;=&lt;span class=&quot;value&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&quot;Data Source=databaseServerName;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;tag&quot; style=&quot;color: blue; font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Monaco, monospace; font-size: 15.3px; margin: 0px; padding: 0px; white-space: pre;&quot;&gt;&lt;span class=&quot;value&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;                       database=database-name;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;tag&quot; style=&quot;color: blue; font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Monaco, monospace; font-size: 15.3px; margin: 0px; padding: 0px; white-space: pre;&quot;&gt;&lt;span class=&quot;value&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;                       uid=sqlUserName;password=sqlPassword;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;tag&quot; style=&quot;color: blue; font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Monaco, monospace; font-size: 15.3px; margin: 0px; padding: 0px; white-space: pre;&quot;&gt;&lt;span class=&quot;value&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;                       &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Monaco, monospace; font-size: 15.3px; white-space: pre;&quot;&gt;Integrated &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Monaco, monospace; font-size: 15.3px; white-space: pre;&quot;&gt;Security&lt;/span&gt;&lt;span style=&quot;background-color: #eff0f1; color: #0f74bd; font-family: inherit; font-size: 13px; font-style: inherit; font-variant-caps: inherit; font-variant-ligatures: inherit; font-weight: inherit; white-space: inherit;&quot;&gt;=True|false|SSPI &lt;/span&gt;&lt;span style=&quot;background-color: #eff0f1; font-family: inherit; font-size: 13px; font-style: inherit; font-variant-caps: inherit; font-variant-ligatures: inherit; white-space: inherit;&quot;&gt;&lt;b&gt;(any one options)&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #eff0f1; color: #0f74bd; font-family: inherit; font-size: 13px; font-style: inherit; font-variant-caps: inherit; font-variant-ligatures: inherit; font-weight: inherit; white-space: inherit;&quot;&gt; ;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Monaco, monospace; font-size: 15.3px; white-space: pre;&quot;&gt;&quot; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Monaco, monospace; font-size: 15.3px; white-space: pre;&quot;&gt;     providerName&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: #eff0f1; border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;background-color: #eff0f1; border: 0px; box-sizing: inherit; color: #0f74bd; font-family: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Monaco, monospace; font-size: 15.3px; white-space: pre;&quot;&gt;System.Data.SqlClient&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;background-color: #eff0f1; border: 0px; box-sizing: inherit; color: #0f74bd; font-family: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;System.Data.SqlClient&quot;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Monaco, monospace; font-size: 15.3px; white-space: pre;&quot;&gt; /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;tag&quot; style=&quot;color: blue; font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Monaco, monospace; font-size: 15.3px; margin: 0px; padding: 0px; white-space: pre;&quot;&gt;&amp;lt;/&lt;span class=&quot;title&quot; style=&quot;color: #a31515; margin: 0px; padding: 0px;&quot;&gt;connectionStrings&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;tag&quot; style=&quot;color: blue; font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Monaco, monospace; font-size: 15.3px; margin: 0px; padding: 0px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Consolas, Lucida Console, Monaco, monospace;&quot;&gt;&lt;span style=&quot;font-size: 15.3px; white-space: pre;&quot;&gt;We can use local database server of SQL Server by using&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas, Lucida Console, Monaco, monospace;&quot;&gt;&lt;span style=&quot;font-size: 15.3px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;Data Source=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #fafafa; color: #a31515; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 14px; white-space: pre;&quot;&gt;(LocalDb)\MSSQLLocalDB &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #fafafa; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 14px; white-space: pre;&quot;&gt;we can attach a local database file to the app_data directory by using the property&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #fafafa; color: #a31515; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 14px; white-space: pre;&quot;&gt;AttachDBFilename=|DataDirectory|\appDatabaseName.mdf &lt;/span&gt;&lt;span style=&quot;background-color: #fafafa; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 14px; white-space: pre;&quot;&gt;in the connection string &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #fafafa; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #fafafa; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 14px; white-space: pre;&quot;&gt;Connection String can be accessed in a class file by using System.Configuration namespace &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #fafafa; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 14px; white-space: pre;&quot;&gt;and using the ConfigurationManager class. &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #fafafa; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;pre class=&quot;default prettyprint prettyprinted&quot; style=&quot;background-color: #eff0f1; border-radius: 3px; border: 0px; box-sizing: inherit; color: #393318; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 1em; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: 12px 8px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; box-sizing: inherit; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SqlConnection&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; con &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;/code&gt;new&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;SqlConnection&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;ConfigurationManager&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;ConnectionStrings&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; box-sizing: inherit; color: #7d2727; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&quot;connectionStringName&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;ConnectionString&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;);&lt;/span&gt;&lt;/pre&gt;
&lt;div class=&quot;grid mb0 fw-wrap ai-start jc-end gs8 gsy&quot; style=&quot;align-items: flex-start !important; border: 0px; box-sizing: inherit; display: flex; flex-wrap: wrap !important; font-family: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; justify-content: flex-end !important; line-height: inherit; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: -4px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;time datetime=&quot;2012-04-19T15:38:50&quot; itemprop=&quot;dateCreated&quot; style=&quot;background-color: white; border: 0px; box-sizing: inherit; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/time&gt;&lt;div class=&quot;grid--cell mr16&quot; style=&quot;background-color: white; border: 0px; box-sizing: inherit; color: #242729; flex: 1 1 100px; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 4px 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;background-color: #fafafa; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #fafafa; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #fafafa; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #fafafa; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mesushil.blogspot.com/feeds/759421935757780998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mesushil.blogspot.com/2019/03/connection-string-in-aspnet-with-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/759421935757780998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/759421935757780998'/><link rel='alternate' type='text/html' href='http://mesushil.blogspot.com/2019/03/connection-string-in-aspnet-with-sql.html' title='Connection String in ASP.NET With SQL Server'/><author><name>Sushil Sapkota</name><uri>http://www.blogger.com/profile/07245946363540402303</uri><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-7546612190200798759.post-1653768006328793322</id><published>2019-03-16T10:02:00.003-07:00</published><updated>2019-03-16T10:03:07.738-07:00</updated><title type='text'>Knowing Nuget and installing a Package </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;segoeui&amp;quot; , &amp;quot;segoe wp&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;tahoma&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;For .NET Microsoft-supported mechanism for sharing code is&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; box-sizing: inherit; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;segoeui&amp;quot; , &amp;quot;segoe wp&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;tahoma&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 16px; font-weight: 600;&quot;&gt;NuGet&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;segoeui&amp;quot; , &amp;quot;segoe wp&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;tahoma&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;, which defines how packages for .NET are created, hosted, and consumed, and provides the tools for each of those roles.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;segoeui&amp;quot; , &amp;quot;segoe wp&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;tahoma&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;It has been an essential tool for through which developers can create, share, and consume useful code. Often such code is bundled into &quot;packages&quot; that contain compiled code (as DLLs) along with other content needed in the projects that consume these packages.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;segoeui&amp;quot; , &amp;quot;segoe wp&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;tahoma&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;segoeui&amp;quot; , &amp;quot;segoe wp&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;tahoma&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&lt;b&gt;How to add Nuget Package to an application&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;segoeui&amp;quot; , &amp;quot;segoe wp&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;tahoma&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&lt;b&gt;Right click Refrences -&amp;gt; Manage Nuget Packages&lt;/b&gt;&lt;/span&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM65fm7g-dsE3KB3_nBFUEwQBTSxz3gAjw9nlSQl2STprYAiR4iXmoQIgxB8arxDVSD6NgOeYpUyj9XqRq9XRYrV6DgW93YuI99jUZibygiQd-fwT3uDuhyphenhyphen8rJtlQ0jmIaWKi6SDGqHVc/s1600/Nuget+Adding+a+Package.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; data-original-height=&quot;736&quot; data-original-width=&quot;1366&quot; height=&quot;344&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM65fm7g-dsE3KB3_nBFUEwQBTSxz3gAjw9nlSQl2STprYAiR4iXmoQIgxB8arxDVSD6NgOeYpUyj9XqRq9XRYrV6DgW93YuI99jUZibygiQd-fwT3uDuhyphenhyphen8rJtlQ0jmIaWKi6SDGqHVc/s640/Nuget+Adding+a+Package.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;2.&amp;nbsp; Type Nuget Package Name you need for the application here we add Entity Framework&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXMWLqjAOTuJF3K0Ocv7qq_P2JbUCpIHuZqICYWPCmas-78VpDRi1E5KbqAH3XaA2e_8o2xIYLcX9Cl37OxZW_6b1e4l7XPquLxFZ6w53ldzaocpyKG4TWDvW9tmPkpu0fgcg4nY9WdS8/s1600/Nuget+EF+Add.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;736&quot; data-original-width=&quot;1366&quot; height=&quot;344&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXMWLqjAOTuJF3K0Ocv7qq_P2JbUCpIHuZqICYWPCmas-78VpDRi1E5KbqAH3XaA2e_8o2xIYLcX9Cl37OxZW_6b1e4l7XPquLxFZ6w53ldzaocpyKG4TWDvW9tmPkpu0fgcg4nY9WdS8/s640/Nuget+EF+Add.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;3.&amp;nbsp;&amp;nbsp;&lt;span style=&quot;text-align: left;&quot;&gt;After the search result is shown click install and accept the agreement asked&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
After this the package is installed and you can use the functionalities that are provided by the package.&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mesushil.blogspot.com/feeds/1653768006328793322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mesushil.blogspot.com/2019/03/knowing-nuget-and-installing-nuget.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/1653768006328793322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/1653768006328793322'/><link rel='alternate' type='text/html' href='http://mesushil.blogspot.com/2019/03/knowing-nuget-and-installing-nuget.html' title='Knowing Nuget and installing a Package '/><author><name>Sushil Sapkota</name><uri>http://www.blogger.com/profile/07245946363540402303</uri><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/AVvXsEiM65fm7g-dsE3KB3_nBFUEwQBTSxz3gAjw9nlSQl2STprYAiR4iXmoQIgxB8arxDVSD6NgOeYpUyj9XqRq9XRYrV6DgW93YuI99jUZibygiQd-fwT3uDuhyphenhyphen8rJtlQ0jmIaWKi6SDGqHVc/s72-c/Nuget+Adding+a+Package.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7546612190200798759.post-9108831314308063783</id><published>2019-03-16T09:37:00.000-07:00</published><updated>2019-03-16T09:37:06.688-07:00</updated><title type='text'>Models In Asp.net MVC</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;What is a Model?&lt;/b&gt;&lt;br /&gt;
Model is a class that represents domain specific data and business logic in a dot net application.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Adding A Model&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
Right click the Models folder in the solution explorer-&amp;gt;Add -&amp;gt; Class&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&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/AVvXsEgzV8VKJfL023hdvGknpFXilqOqivFW6IloKLi1fWIiWQORoQE-eMTLizz6XeAU2gV-qyxKypIxKSdhwPQ8U2Wzg95k9ifJIDwLvCxjNrn0FuLY5hJpH17R91f5kgSS9eLyS10AaLxwKE4/s1600/MVC+Adding+a+Model+Step+I+.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;736&quot; data-original-width=&quot;1366&quot; height=&quot;344&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzV8VKJfL023hdvGknpFXilqOqivFW6IloKLi1fWIiWQORoQE-eMTLizz6XeAU2gV-qyxKypIxKSdhwPQ8U2Wzg95k9ifJIDwLvCxjNrn0FuLY5hJpH17R91f5kgSS9eLyS10AaLxwKE4/s640/MVC+Adding+a+Model+Step+I+.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
After that Select Visual C#-&amp;gt; Class&amp;nbsp; and provide a suitable name for your model class&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/AVvXsEgxiFC1-pQbV2gGtBAQZ8vQXMgnhmiADoQCFvymR-7u13oJBP7SAauYJ5XYdrtFA_xuFzSLFq6CexRVvqx0KvAlejM0dp2aDpl2rfzk9usrH1hzaTOiNHm-PB6MfEjXD8FgSxEq2Gl_7VQ/s1600/MVC+Adding+a+Model.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;736&quot; data-original-width=&quot;1366&quot; height=&quot;344&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxiFC1-pQbV2gGtBAQZ8vQXMgnhmiADoQCFvymR-7u13oJBP7SAauYJ5XYdrtFA_xuFzSLFq6CexRVvqx0KvAlejM0dp2aDpl2rfzk9usrH1hzaTOiNHm-PB6MfEjXD8FgSxEq2Gl_7VQ/s640/MVC+Adding+a+Model.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Sample Model Class&lt;/b&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/AVvXsEhAo3iPRBaPghLiCu06MGslKhFk__BbIc-LlxcNFb1ldQ2qmOfZZN71AD3OaSVh0UWNuY5YHhHyos3wSU5cpTNIMyUveMvEwTT0IHC1ZTTU5y-mVpvB1lW9BWvTTdMt-YsXfvv4T_Z84q4/s1600/mvc+model+sample.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;736&quot; data-original-width=&quot;1366&quot; height=&quot;344&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAo3iPRBaPghLiCu06MGslKhFk__BbIc-LlxcNFb1ldQ2qmOfZZN71AD3OaSVh0UWNuY5YHhHyos3wSU5cpTNIMyUveMvEwTT0IHC1ZTTU5y-mVpvB1lW9BWvTTdMt-YsXfvv4T_Z84q4/s640/mvc+model+sample.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
In Model validation logic can be added using &lt;b&gt;Attributes in C# . &lt;/b&gt;Some validation attributes like StringLength,RegularExpression are used in the model.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mesushil.blogspot.com/feeds/9108831314308063783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mesushil.blogspot.com/2019/03/models-in-aspnet-mvc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/9108831314308063783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/9108831314308063783'/><link rel='alternate' type='text/html' href='http://mesushil.blogspot.com/2019/03/models-in-aspnet-mvc.html' title='Models In Asp.net MVC'/><author><name>Sushil Sapkota</name><uri>http://www.blogger.com/profile/07245946363540402303</uri><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/AVvXsEgzV8VKJfL023hdvGknpFXilqOqivFW6IloKLi1fWIiWQORoQE-eMTLizz6XeAU2gV-qyxKypIxKSdhwPQ8U2Wzg95k9ifJIDwLvCxjNrn0FuLY5hJpH17R91f5kgSS9eLyS10AaLxwKE4/s72-c/MVC+Adding+a+Model+Step+I+.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7546612190200798759.post-3324561188068842982</id><published>2019-03-16T09:03:00.002-07:00</published><updated>2019-03-16T09:06:10.622-07:00</updated><title type='text'>Getting Started With ASP.NET MVC First Application</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
Requirements: Visual Studio (i am using VS 2017 for demo)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Open up the visual studio and Click &lt;b&gt;File -&amp;gt; New -&amp;gt;Project&lt;/b&gt;&amp;nbsp;&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/AVvXsEgjQIR6BpYXtH5Wy4c1tHWni47WAhNO7a9CQXzpGofT7p4hVchPQCV8NBXBy3kPuPlm3UTUr791KdrP9wRFZwcp0_997u83keIFnmrYCAhPaarnwJJGymJ-94Ih8UpiIgomzAiIZZwPKBE/s1600/MVC-Create-new-project.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;403&quot; data-original-width=&quot;695&quot; height=&quot;185&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjQIR6BpYXtH5Wy4c1tHWni47WAhNO7a9CQXzpGofT7p4hVchPQCV8NBXBy3kPuPlm3UTUr791KdrP9wRFZwcp0_997u83keIFnmrYCAhPaarnwJJGymJ-94Ih8UpiIgomzAiIZZwPKBE/s320/MVC-Create-new-project.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;Click Visual C# -&amp;gt; Asp.Net Web Application (.NET Framework)&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; In the Name i.e Project Name and Solution give the name as required here I have given&amp;nbsp; &amp;nbsp; &amp;nbsp; Name: WebApp&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; &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; &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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Solution Name: StudentInformation&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-ZqmdJcwdRkYG1TkmpPPGmH_9i0l2gg2Ui7Otm412HYbPeMeKOUpNQW1EfrQ8Gz0lwkacPnw-xmFw2LXE_OR7XF6Vp14t1eIT0BEPS9Nj_1HKszaQ7YzRpQILCe_T1wpWKa1RFtHdMtA/s1600/MVC-Project-2ndStep.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; data-original-height=&quot;575&quot; data-original-width=&quot;941&quot; height=&quot;388&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-ZqmdJcwdRkYG1TkmpPPGmH_9i0l2gg2Ui7Otm412HYbPeMeKOUpNQW1EfrQ8Gz0lwkacPnw-xmFw2LXE_OR7XF6Vp14t1eIT0BEPS9Nj_1HKszaQ7YzRpQILCe_T1wpWKa1RFtHdMtA/s640/MVC-Project-2ndStep.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Select MVC and then click OK&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/AVvXsEj8ELr0kc-_PQhm7ouUMmpivj_NQti6wtCcyGaq4KbiMzjGwehZfmKiJkpAvpjwDItNM7ax7rZR0Au39WxAu0cEFHmA0x-OsB6pVT7ruITaG6t-xulAZt7XBC0Z1b6_c5SKsmRL-R2WFZU/s1600/MVC-Project-3rdStep.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;520&quot; data-original-width=&quot;786&quot; height=&quot;211&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8ELr0kc-_PQhm7ouUMmpivj_NQti6wtCcyGaq4KbiMzjGwehZfmKiJkpAvpjwDItNM7ax7rZR0Au39WxAu0cEFHmA0x-OsB6pVT7ruITaG6t-xulAZt7XBC0Z1b6_c5SKsmRL-R2WFZU/s320/MVC-Project-3rdStep.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
The application will open with the following view&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/AVvXsEi0GV-kLz1b8f0hlriomFBBYgdIhww8zhfoQ8rEZxA9TjOFaYGoIq1ZaWHmIZPxVW2QXIdC37jWNNyul6e4yf2mWoMLNYKaC_Ox9aCPjqtZpGOi-RXkn329j1yMd0x7Vclfmyj0nKhUtnQ/s1600/MVC-Project-4th+View.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;736&quot; data-original-width=&quot;1366&quot; height=&quot;172&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0GV-kLz1b8f0hlriomFBBYgdIhww8zhfoQ8rEZxA9TjOFaYGoIq1ZaWHmIZPxVW2QXIdC37jWNNyul6e4yf2mWoMLNYKaC_Ox9aCPjqtZpGOi-RXkn329j1yMd0x7Vclfmyj0nKhUtnQ/s320/MVC-Project-4th+View.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Run the application from the menu bar or can press F5 or CTRL+F5&amp;nbsp;&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/AVvXsEjqoD6YeATT4WmYzH6rbX_2Q-vfy_WBD_ynAdHmJYgJU2er0Dd6NIYuXtBhNV30qC2cc0Tz_MH8jiBLFD32SZv3eK46O6gCUBbm2vQMT4mb-QXXs3baP4T5EBlktGYbsn8f8UYw-Vu9bZ0/s1600/MVC-Project-5th-view.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;736&quot; data-original-width=&quot;1366&quot; height=&quot;172&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqoD6YeATT4WmYzH6rbX_2Q-vfy_WBD_ynAdHmJYgJU2er0Dd6NIYuXtBhNV30qC2cc0Tz_MH8jiBLFD32SZv3eK46O6gCUBbm2vQMT4mb-QXXs3baP4T5EBlktGYbsn8f8UYw-Vu9bZ0/s320/MVC-Project-5th-view.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
The first ASP.NET MVC Application is up and running in your web browser. It opens the applications home page and opens in the web browser with localhost:port . Visual studio assigns the random port number and hence the port number you see differs.&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mesushil.blogspot.com/feeds/3324561188068842982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mesushil.blogspot.com/2019/03/getting-started-with-aspnet-mvc-first.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/3324561188068842982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/3324561188068842982'/><link rel='alternate' type='text/html' href='http://mesushil.blogspot.com/2019/03/getting-started-with-aspnet-mvc-first.html' title='Getting Started With ASP.NET MVC First Application'/><author><name>Sushil Sapkota</name><uri>http://www.blogger.com/profile/07245946363540402303</uri><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/AVvXsEgjQIR6BpYXtH5Wy4c1tHWni47WAhNO7a9CQXzpGofT7p4hVchPQCV8NBXBy3kPuPlm3UTUr791KdrP9wRFZwcp0_997u83keIFnmrYCAhPaarnwJJGymJ-94Ih8UpiIgomzAiIZZwPKBE/s72-c/MVC-Create-new-project.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7546612190200798759.post-5230847427486076105</id><published>2019-03-16T08:01:00.001-07:00</published><updated>2019-03-16T08:01:51.600-07:00</updated><title type='text'>Introduction to ASP.NET MVC</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;What Is Asp.Net MVC ?&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;Asp.net MVC is a framework introduced by microsoft in 2008 for building web application.&lt;br /&gt;
Asp.net MVC is an architectural pattern built on top of ASP.Net Framework for development of&lt;br /&gt;
application based on three main logical components.&lt;br /&gt;
Asp.net MVC is lightweight and testable framework and can be used to develop highly scalable and extensible enterprise level applications.&lt;br /&gt;
Three main components of MVC&lt;br /&gt;
&lt;b&gt;1. Model&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;Model is a data specific logic that the application works with.It generally represents the data that is transferred between storage layer and application and between view and controller.&lt;br /&gt;
In general Model is a class that contains properties specific to the application domain and transfer data between different components.&lt;br /&gt;
&lt;b&gt;2.View&lt;/b&gt;&lt;br /&gt;
View is an user interface that can use model to populate data to the users. They are results of the request made by an user to the application and is returned from controller.&lt;br /&gt;
&lt;b&gt;3. Controller&lt;/b&gt;&lt;br /&gt;
Controller is a component that handles all the incoming request of the application and provides response to the request.&lt;br /&gt;
It generally is an interface that interacts between View and Model and hence renders output for the requests.&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/AVvXsEixdQlTL4Gx4DplNfy9g7t36i_TEaFkLOt0lpMnZIuvDco8aUXbAc_ircb-vIIC7jKQ7Mg5T6Xn2n73DBOe9cOjMMYrPLZNPVR54xWL310BPvqsuKzjSkBXhnqRDbr7qp1ntx0SjRPcKrU/s1600/mvc.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;314&quot; data-original-width=&quot;327&quot; height=&quot;307&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixdQlTL4Gx4DplNfy9g7t36i_TEaFkLOt0lpMnZIuvDco8aUXbAc_ircb-vIIC7jKQ7Mg5T6Xn2n73DBOe9cOjMMYrPLZNPVR54xWL310BPvqsuKzjSkBXhnqRDbr7qp1ntx0SjRPcKrU/s320/mvc.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mesushil.blogspot.com/feeds/5230847427486076105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mesushil.blogspot.com/2019/03/introduction-to-aspnet-mvc.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/5230847427486076105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/5230847427486076105'/><link rel='alternate' type='text/html' href='http://mesushil.blogspot.com/2019/03/introduction-to-aspnet-mvc.html' title='Introduction to ASP.NET MVC'/><author><name>Sushil Sapkota</name><uri>http://www.blogger.com/profile/07245946363540402303</uri><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/AVvXsEixdQlTL4Gx4DplNfy9g7t36i_TEaFkLOt0lpMnZIuvDco8aUXbAc_ircb-vIIC7jKQ7Mg5T6Xn2n73DBOe9cOjMMYrPLZNPVR54xWL310BPvqsuKzjSkBXhnqRDbr7qp1ntx0SjRPcKrU/s72-c/mvc.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7546612190200798759.post-7450963304342210525</id><published>2019-02-24T08:26:00.003-08:00</published><updated>2019-02-24T08:28:17.762-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mssql"/><category scheme="http://www.blogger.com/atom/ns#" term="rdbms"/><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="ssms"/><title type='text'>Introduction to Microsoft SQL Server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Microsoft SQL Server is a Relational Database Management System(RDBMS) developed by Microsoft. It is one of the most popular RDBMS. SQL server has evolved from sql 1.0 in 1989&amp;nbsp;&amp;nbsp;to the latest release of &lt;a href=&quot;https://docs.microsoft.com/en-us/sql/sql-server/sql-server-ver15-release-notes?view=sqlallproducts-allversions&quot; target=&quot;_blank&quot;&gt;SQL Server 2019 (preview)&lt;/a&gt;&amp;nbsp;to become one of the best enterprise level database server&#39;s.&lt;br /&gt;
SQL server is released with different editions.&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Express: Free to use entry level database which can use 1 core cpu, 1 GB ram and have maximum size of 10GB.&lt;/li&gt;
&lt;li&gt;Compact : Free embedded database for mobile app development and can have maximum size of 4GB.&lt;/li&gt;
&lt;li&gt;Enterprise : Full featured top end edition.&lt;/li&gt;
&lt;li&gt;Standard : Have less features than enterprise.&lt;/li&gt;
&lt;li&gt;WorkGroup: suitable for a company to use among the group.&lt;/li&gt;
&lt;li&gt;Developer: Same features like enterprise but is&amp;nbsp;&lt;span style=&quot;background-color: white; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;geneva&amp;quot; , &amp;quot;tahoma&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px; text-align: justify;&quot;&gt;licensed&amp;nbsp;&lt;/span&gt;to one user only.&lt;/li&gt;
&lt;li&gt;Web: Specially targeted for web application&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
There are some other editions like Datacenter, Enterprise evaluation and Business Intelligence.&lt;/div&gt;
&lt;div&gt;
These all editions are not available on all version of SQL Server.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Now: For learning purpose i will recommend you to download express edition&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
you can download 2017 express edition by visiting this link&amp;nbsp;&amp;nbsp;&lt;a href=&quot;https://www.microsoft.com/en-us/sql-server/sql-server-editions-express&quot; target=&quot;_blank&quot;&gt;click here&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;RDBMS&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
RDBMS is a database management system that is based on the relational model introduced by Edgar F. Codd &lt;span style=&quot;color: #222222; font-family: sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14px;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;It has been a widely used option for storage of information in a database.&lt;span style=&quot;background-color: white; font-family: sans-serif; font-size: 14px;&quot;&gt;It is the basis for SQL, and most of the modern database systems like MS SQL,IBM.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: sans-serif; font-size: 14px;&quot;&gt;&lt;b&gt;SSMS(&lt;/b&gt;Sql Serever Management Studio)&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: sans-serif; font-size: 14px;&quot;&gt;It is a software application that is used to&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: sans-serif; font-size: 14px;&quot;&gt;configure, manage, and administer all components within the SQL Server.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #222222; font-family: sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;SSMS was a part of the SQL server during installation in older version of SQL Server( before Sql Server 2014) but later SSMS is a separate&amp;nbsp;installation.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Download SSMS 2017 by visiting this link &lt;a href=&quot;https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017&quot; target=&quot;_blank&quot;&gt;click here&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: sans-serif; font-size: 14px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mesushil.blogspot.com/feeds/7450963304342210525/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mesushil.blogspot.com/2019/02/introduction-to-microsoft-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/7450963304342210525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/7450963304342210525'/><link rel='alternate' type='text/html' href='http://mesushil.blogspot.com/2019/02/introduction-to-microsoft-sql-server.html' title='Introduction to Microsoft SQL Server'/><author><name>Sushil Sapkota</name><uri>http://www.blogger.com/profile/07245946363540402303</uri><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-7546612190200798759.post-4386681354299842395</id><published>2019-02-02T23:32:00.001-08:00</published><updated>2019-02-02T23:34:05.410-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sql"/><category scheme="http://www.blogger.com/atom/ns#" term="update column from another table"/><category scheme="http://www.blogger.com/atom/ns#" term="update in sql"/><title type='text'>Update column with data from another table in SQL</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;pre class=&quot;lang-sql prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;kwd&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-sql prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;kwd&quot;&gt;At different point of time we come up with a situation&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-sql prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;kwd&quot;&gt;where we need to update a column in a table from another&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-sql prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;kwd&quot;&gt;&amp;nbsp;table based on some condition.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-sql prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;kwd&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-sql prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;kwd&quot;&gt;So a Basic Syntax for update is:&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-sql prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;kwd&quot;&gt;UPDATE table
SET column1 = expression1,
    column2 = expression2,
    ...
[WHERE conditions];&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-sql prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;kwd&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-sql prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;kwd&quot;&gt;For us to update based on another table we will be using the&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-sql prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;kwd&quot;&gt;same syntax for update  applying join with another table from&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-sql prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;kwd&quot;&gt;&amp;nbsp;where we need the data.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-sql prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;kwd&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-sql prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;kwd&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-sql prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;kwd&quot;&gt;UPDATE&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; t1
  &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;SET&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; t1&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.column_to_update&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; t2&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.column_from_update&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;FROM&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; Table1&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;t1
  &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;INNER&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;JOIN&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;Table2 &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;AS&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; t2
  &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;ON&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; t1&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.common_column&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; t2&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.common_column&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
 &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mesushil.blogspot.com/feeds/4386681354299842395/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mesushil.blogspot.com/2019/02/update-column-with-data-from-another.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/4386681354299842395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/4386681354299842395'/><link rel='alternate' type='text/html' href='http://mesushil.blogspot.com/2019/02/update-column-with-data-from-another.html' title='Update column with data from another table in SQL'/><author><name>Sushil Sapkota</name><uri>http://www.blogger.com/profile/07245946363540402303</uri><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-7546612190200798759.post-2716703281356098501</id><published>2019-01-28T01:52:00.000-08:00</published><updated>2019-01-28T01:52:59.183-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="datetime"/><category scheme="http://www.blogger.com/atom/ns#" term="weekofday"/><title type='text'>Extract Week Start Date and End  Date from a given date in c#</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;iframe width=&quot;100%&quot; height=&quot;800&quot; src=&quot;https://dotnetfiddle.net/Widget/YdzrWW&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mesushil.blogspot.com/feeds/2716703281356098501/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mesushil.blogspot.com/2019/01/extract-week-start-date-and-end-date.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/2716703281356098501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/2716703281356098501'/><link rel='alternate' type='text/html' href='http://mesushil.blogspot.com/2019/01/extract-week-start-date-and-end-date.html' title='Extract Week Start Date and End  Date from a given date in c#'/><author><name>Sushil Sapkota</name><uri>http://www.blogger.com/profile/07245946363540402303</uri><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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7546612190200798759.post-108938303652958519</id><published>2019-01-28T00:20:00.002-08:00</published><updated>2019-01-28T00:20:45.528-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="dns"/><category scheme="http://www.blogger.com/atom/ns#" term="mail configuration"/><category scheme="http://www.blogger.com/atom/ns#" term="mx record"/><category scheme="http://www.blogger.com/atom/ns#" term="windows server"/><title type='text'>Configure DNS to use an external mail server in Windows Server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;External mail server can &lt;/b&gt;be used in the hosting server by configuring Mail Exchange (&lt;b&gt;MX&lt;/b&gt;) Record.&lt;br /&gt;
&lt;br /&gt;
The Domain Name System(DNS) has several types of resource records that full fill the name to ip address translation(Directly or indirectly). One of the widely used record is MX Record.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;An MX record should return the fully qualified domain name of an email server and its preference value .&lt;br /&gt;
MX Record can be configured by following the step below.&lt;br /&gt;
&lt;br /&gt;
1. Open DNS Manager&lt;br /&gt;
2. Add A Record for your mail&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(eg: mail.domain.com with the ip address of another server)&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&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/AVvXsEinq_vJ8V0pcUoq-477LzpeKnHlmtSsOwy8FV8iC5rZvgzh0Qn8Prw9f86Hy1OhR_vPOdZ36czP-cxpBh7HRW6VpLFzXNIqz17NnldoIPpMwsTquvjOpF-QXdx9qm2ynaNu0kCzX2yYUkI/s1600/2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;248&quot; data-original-width=&quot;387&quot; height=&quot;256&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinq_vJ8V0pcUoq-477LzpeKnHlmtSsOwy8FV8iC5rZvgzh0Qn8Prw9f86Hy1OhR_vPOdZ36czP-cxpBh7HRW6VpLFzXNIqz17NnldoIPpMwsTquvjOpF-QXdx9qm2ynaNu0kCzX2yYUkI/s400/2.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Add&amp;nbsp; MX Record and set FQDN&amp;nbsp; to the name assigned in A Record&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (i.e mail.domain.com)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;Preference number can have any value between 0 to 65535 and lower number sets for higher&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; priority.&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/AVvXsEhRZJFR2JBj8n3WZiatZc30c7J-JJDKU6kYaBn6EYLATFuMoevpCQGQ95RwkhnOgwCaLvV6oywCEaobobnOaQp4KQ2OZuxUnus4j003mWeNjPyewyBz64zbjpW2cpETnPaX0rlQobQy2FU/s1600/1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;359&quot; data-original-width=&quot;392&quot; height=&quot;366&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRZJFR2JBj8n3WZiatZc30c7J-JJDKU6kYaBn6EYLATFuMoevpCQGQ95RwkhnOgwCaLvV6oywCEaobobnOaQp4KQ2OZuxUnus4j003mWeNjPyewyBz64zbjpW2cpETnPaX0rlQobQy2FU/s400/1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
After completing this step, The mail server is pointed to the ip addres provided in the A record for the specific domain.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mesushil.blogspot.com/feeds/108938303652958519/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mesushil.blogspot.com/2019/01/configure-dns-to-use-external-mail.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/108938303652958519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/108938303652958519'/><link rel='alternate' type='text/html' href='http://mesushil.blogspot.com/2019/01/configure-dns-to-use-external-mail.html' title='Configure DNS to use an external mail server in Windows Server'/><author><name>Sushil Sapkota</name><uri>http://www.blogger.com/profile/07245946363540402303</uri><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/AVvXsEinq_vJ8V0pcUoq-477LzpeKnHlmtSsOwy8FV8iC5rZvgzh0Qn8Prw9f86Hy1OhR_vPOdZ36czP-cxpBh7HRW6VpLFzXNIqz17NnldoIPpMwsTquvjOpF-QXdx9qm2ynaNu0kCzX2yYUkI/s72-c/2.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7546612190200798759.post-7048985819137742913</id><published>2019-01-26T01:02:00.001-08:00</published><updated>2019-01-26T01:02:39.564-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="hosting"/><category scheme="http://www.blogger.com/atom/ns#" term="iis"/><category scheme="http://www.blogger.com/atom/ns#" term="sql"/><category scheme="http://www.blogger.com/atom/ns#" term="sql permission"/><category scheme="http://www.blogger.com/atom/ns#" term="sqlexception"/><title type='text'>SqlException: Login failed for user &#39;IIS APPPOOL\</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
This issue is related with the permission for application pool to connect with the sql.&lt;br /&gt;
We can create login user with the name as specified in the exception&amp;nbsp;&lt;b&gt;IIS APPPOOL\&amp;lt;name&amp;gt;&lt;/b&gt;&lt;br /&gt;
and grant permission to the database.&lt;br /&gt;
We can create new login user by opening the SSMS(Sql server management studio) navigate to &lt;b&gt;Security&amp;gt;Login&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
Then Add the user by right clicking Login and selecting &lt;b&gt;new login&lt;/b&gt;&lt;br /&gt;
While creating user Navigate to UserMapping and tick the database for the specific user.&lt;br /&gt;
&lt;br /&gt;
This process will create the new user and gran permission to the user.&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/AVvXsEjWdUshVkRQ7Enri5cn40_gFqkdrNlDOsYZfHzF2rZ7VyOVAD3484vv_TSum-HbK7Dj8ikdxsHA79JXy1U8rTerH-za3P1wMCaH9MY_quNvMr0OE8-NSH2Dysko9d91V-NUZ458eXiWHtE/s1600/2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;178&quot; data-original-width=&quot;676&quot; height=&quot;168&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWdUshVkRQ7Enri5cn40_gFqkdrNlDOsYZfHzF2rZ7VyOVAD3484vv_TSum-HbK7Dj8ikdxsHA79JXy1U8rTerH-za3P1wMCaH9MY_quNvMr0OE8-NSH2Dysko9d91V-NUZ458eXiWHtE/s640/2.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;/div&gt;
&lt;br /&gt;
&lt;b&gt;Another Work Around&lt;/b&gt;&lt;br /&gt;
Yet another simple way will be to change the application pool &lt;b&gt;Identity property&lt;/b&gt;&amp;nbsp;To &lt;b&gt;LocalSystem &lt;/b&gt;by navigating to the application pool and then advance setting.&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/AVvXsEhoGGfKW7oukaF3vWQxuqpx5nx83k6RnxFz30qD5g6nnzaVsllCmmQeq6_WXpr6xd5xlFExFTSWvIUy3Zzz0FNnbH9UTM0u-tePhg3tM-sFtmukP7_6i8UUG8Pv7WCXDkZMCBcqvKHlYJQ/s1600/1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;160&quot; data-original-width=&quot;387&quot; height=&quot;165&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoGGfKW7oukaF3vWQxuqpx5nx83k6RnxFz30qD5g6nnzaVsllCmmQeq6_WXpr6xd5xlFExFTSWvIUy3Zzz0FNnbH9UTM0u-tePhg3tM-sFtmukP7_6i8UUG8Pv7WCXDkZMCBcqvKHlYJQ/s400/1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mesushil.blogspot.com/feeds/7048985819137742913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mesushil.blogspot.com/2019/01/sqlexception-login-failed-for-user-iis.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/7048985819137742913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/7048985819137742913'/><link rel='alternate' type='text/html' href='http://mesushil.blogspot.com/2019/01/sqlexception-login-failed-for-user-iis.html' title='SqlException: Login failed for user &#39;IIS APPPOOL\&lt;name&gt;'/><author><name>Sushil Sapkota</name><uri>http://www.blogger.com/profile/07245946363540402303</uri><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/AVvXsEjWdUshVkRQ7Enri5cn40_gFqkdrNlDOsYZfHzF2rZ7VyOVAD3484vv_TSum-HbK7Dj8ikdxsHA79JXy1U8rTerH-za3P1wMCaH9MY_quNvMr0OE8-NSH2Dysko9d91V-NUZ458eXiWHtE/s72-c/2.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7546612190200798759.post-5717615238745578523</id><published>2019-01-21T09:28:00.001-08:00</published><updated>2019-01-21T09:30:35.470-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="algorithm"/><category scheme="http://www.blogger.com/atom/ns#" term="bubble sort"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><title type='text'>Bubble Sort in C-Sharp</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;Bubble Sort is a &lt;/b&gt;simple sorting algorithms that iterates through a list and compares adjacent item and swaps them in the order if they are in the wrong order.&amp;nbsp; The iteration is completed after the&amp;nbsp; items bubble to there specific position and the list is sorted ascending or descending.&lt;br /&gt;
Bubble sort is simple but too slow and impractical in most of the cases.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Figure :&lt;/b&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/AVvXsEhrtyb4tdEEZ3ugyGzOWH1sil8b0dWeEl3RtPMVVPAQ4zirxL11DxetzT5U3WSfrnoBFF0vSNbvbBX3zPnxYFsP05HkuB0cSpmIZagLWlrBnP94vmCQqBmNpay44XNHP46bS98EkBNn42E/s1600/bubble-sort.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;180&quot; data-original-width=&quot;300&quot; height=&quot;120&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrtyb4tdEEZ3ugyGzOWH1sil8b0dWeEl3RtPMVVPAQ4zirxL11DxetzT5U3WSfrnoBFF0vSNbvbBX3zPnxYFsP05HkuB0cSpmIZagLWlrBnP94vmCQqBmNpay44XNHP46bS98EkBNn42E/s200/bubble-sort.gif&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;Algorithm:&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;prettyprint notranslate prettyprinted&quot; style=&quot;background-color: #eeeeee; border-radius: 0px; border: 1px solid rgb(214, 214, 214); box-sizing: border-box; color: #313131; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 13px; line-height: 16px; margin-bottom: 10px; margin-top: 15px; overflow: auto; padding: 5px; width: 604px;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box;&quot;&gt; all elements in Array
      &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box;&quot;&gt; Array&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box;&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box;&quot;&gt; Array&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box;&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box;&quot;&gt;
         swap&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box;&quot;&gt;Array&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box;&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;],&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box;&quot;&gt; Array&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box;&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;])&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box;&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;end&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box;&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;end&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box;&quot;&gt;
    return Array&lt;/span&gt;&lt;/pre&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;CODE :&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;iframe frameborder=&quot;0&quot; height=&quot;475&quot; src=&quot;https://dotnetfiddle.net/Widget/iVCAsX&quot; width=&quot;100%&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mesushil.blogspot.com/feeds/5717615238745578523/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mesushil.blogspot.com/2019/01/bubble-sort-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/5717615238745578523'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/5717615238745578523'/><link rel='alternate' type='text/html' href='http://mesushil.blogspot.com/2019/01/bubble-sort-in-c.html' title='Bubble Sort in C-Sharp'/><author><name>Sushil Sapkota</name><uri>http://www.blogger.com/profile/07245946363540402303</uri><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/AVvXsEhrtyb4tdEEZ3ugyGzOWH1sil8b0dWeEl3RtPMVVPAQ4zirxL11DxetzT5U3WSfrnoBFF0vSNbvbBX3zPnxYFsP05HkuB0cSpmIZagLWlrBnP94vmCQqBmNpay44XNHP46bS98EkBNn42E/s72-c/bubble-sort.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7546612190200798759.post-2263468745196143951</id><published>2019-01-14T09:21:00.000-08:00</published><updated>2019-01-14T09:21:05.885-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="read from a file"/><category scheme="http://www.blogger.com/atom/ns#" term="streamreader"/><category scheme="http://www.blogger.com/atom/ns#" term="streamwriter"/><category scheme="http://www.blogger.com/atom/ns#" term="wirte to a file"/><title type='text'>Reading and Writing to a file text file in C#</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Lets start by taking the below&amp;nbsp; code as an example:&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
private void WriteToAFile(){&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string data = &quot;hi ! what&#39;s up&quot;;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string path = &quot;data.txt&quot;;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!File.Exists(path))&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; File.Create(path);&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; using (StreamWriter writer = new StreamWriter(path, append: true))&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; writer.WriteLine(data);&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
}&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Writing to a text file&lt;/b&gt; can be achieved by using StreamWriter class . To use this class we need to use System.IO namespace.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
if we are writing to a file then exception might occur if the file doesn&#39;t exists. So firstly we need to check if the File Exists. If it doesn&#39;t exist we can create a file in the path specified.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Here in example I haven&#39;t provided the fully qualified path like&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&quot;C:\Users\Mypc\project\Sample&quot; absolute path&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
but rather used relative path by providing only the file name.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
The file will be created inside the bin folder either in debug or release depending on how you run.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Creating object of &lt;b&gt;StreamWriter &lt;/b&gt;by passing path and true as&amp;nbsp; parameter.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica Neue, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Append mode opens file and moves pointer to the end of file, so the next thing you write will be appended else the existing data will be overwritten.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica Neue, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;WriteLine &lt;/b&gt;method writes stream to the file with line terminator.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica Neue, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Similar &lt;b&gt;Write&lt;/b&gt; method can be used to write string to the file.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica Neue, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;there are several &lt;u&gt;overloading methods&lt;/u&gt; to these stated methods.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Reading from a text file&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Reading can be achieved by using StreamReader class.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
below is the code example to read from an existing text file:&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
using (StreamReader sr = new StreamReader(path))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while ((line = sr.ReadLine()) != null)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(line);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mesushil.blogspot.com/feeds/2263468745196143951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mesushil.blogspot.com/2019/01/reading-and-writing-to-file-text-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/2263468745196143951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/2263468745196143951'/><link rel='alternate' type='text/html' href='http://mesushil.blogspot.com/2019/01/reading-and-writing-to-file-text-file.html' title='Reading and Writing to a file text file in C#'/><author><name>Sushil Sapkota</name><uri>http://www.blogger.com/profile/07245946363540402303</uri><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-7546612190200798759.post-4287214022275345980</id><published>2019-01-13T08:40:00.000-08:00</published><updated>2019-01-13T08:43:43.684-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Class"/><category scheme="http://www.blogger.com/atom/ns#" term="Object"/><title type='text'>Classes and Objects  In C#</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;Class&amp;nbsp; &lt;/b&gt;is a collection of fields, properties and methods. It depicts real life entities and is a fundamental concept in Object Oriented Programming.&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;roboto&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;A class is a user-defined blueprint&amp;nbsp; from which objects are created . A class is a user defined data type of&amp;nbsp;&lt;u&gt;reference type.&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Lets take a example of a Car . It has different attributes like color,maximum speed,no of gears on with a built in audio player&amp;nbsp; and so on.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
public class Car&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; private string&amp;nbsp; _color; //a variable and a field with data type string&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; // a variable and&amp;nbsp; a property&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; public string Color&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; get&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return _color;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _color= value;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
public void&amp;nbsp; PlayAudio()&lt;br /&gt;
{&lt;br /&gt;
//implementation logic&lt;br /&gt;
}&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Declaration Of Class:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&amp;lt;access specifier&amp;gt;&amp;lt;keyword:class&amp;gt; &amp;lt;class name: Car&amp;gt;&lt;br /&gt;
public class car&lt;br /&gt;
&lt;br /&gt;
if access identifier is not explicitly mentioned a class has internal access identifier as default while methods and properties have private access identifier.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Fields&lt;/b&gt; :&amp;nbsp; field is private to the class and stores the actual data.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Properties &lt;/b&gt;: Properties are exposed contract which uses the underlying fields.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;Properties are also called accessors as they offer a way to get and set a field in the class.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Properties can be read-only,write-only or both by declaring get{},set{} or both.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Object :&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Object &lt;/b&gt;is an instance of a class which is created at run time. It is a memory&amp;nbsp; allocation according to the class of which it is an instance of&amp;nbsp; . It is used to access properties and methods in a class.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;Initializing an object&lt;/b&gt;&lt;br /&gt;
An object is initialized by using the keyword new.&lt;br /&gt;
&lt;br /&gt;
Car c=new Car();&lt;br /&gt;
&amp;nbsp;here c is an object of type car.&lt;br /&gt;
if we split the above initialization in two lines&lt;br /&gt;
Car c ; // it is a declaration which states that c is a variable of type class c;&lt;br /&gt;
c=new Car();// now c is an object of class Car&lt;br /&gt;
&lt;br /&gt;
and we can access the properties and methods of the class&lt;br /&gt;
c.Color=red;&amp;nbsp; //assigning value to the property of the object&lt;br /&gt;
string color=c.Color; //getting the value of the property from the object&lt;br /&gt;
c.PlayAudio(); //invoking method&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mesushil.blogspot.com/feeds/4287214022275345980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mesushil.blogspot.com/2019/01/classes-and-objects-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/4287214022275345980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/4287214022275345980'/><link rel='alternate' type='text/html' href='http://mesushil.blogspot.com/2019/01/classes-and-objects-in-c.html' title='Classes and Objects  In C#'/><author><name>Sushil Sapkota</name><uri>http://www.blogger.com/profile/07245946363540402303</uri><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-7546612190200798759.post-6150839238360262285</id><published>2019-01-10T02:19:00.001-08:00</published><updated>2019-01-10T02:19:15.580-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="windows service"/><title type='text'>Installing Windows Service </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;What is a windows Service ?&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;Windows service is a long running process that runs as a background process in windows OS.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; We create windows service when we need to perform tasks without the user interaction. Like regular application windows services lacks UI for user interaction.&lt;br /&gt;
&lt;br /&gt;
We can install windows service by navigating to installutil.exe file that resides in Microsoft.Net Folder inside Windows folder.&lt;br /&gt;
For for .net version 4&lt;br /&gt;
the file path is&amp;nbsp; C:\Windows\Microsoft.NET\Framework\v4.0.30319&lt;br /&gt;
&amp;nbsp;we can install the service by running the following command in CommandLine&amp;nbsp; opening it as an Administrator.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;lang-cs prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;str&quot;&gt;&quot;C:\Windows\Microsoft.NET\Framework\v4.0.30319\installutil.exe&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;E:\servicename.exe&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-cs prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;str&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-cs prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;str&quot;&gt;See the following command run  for installing the merotrackerlistener in the system.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-cs prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;str&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&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/AVvXsEgepfcefnIlpuuk18VLXUaDs1fY8yleEMrLFZbJDwtcwupMpLhtGvGwbpfcpsB93ooRB1SyvslxZGrMkE5jJ-RL8_yWnQTs_b8K6wtSGZu_bwkZWDmPMzlANgSsmbq33_2NUz1PukHdZnM/s1600/installing+windows+service.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;75&quot; data-original-width=&quot;938&quot; height=&quot;49&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgepfcefnIlpuuk18VLXUaDs1fY8yleEMrLFZbJDwtcwupMpLhtGvGwbpfcpsB93ooRB1SyvslxZGrMkE5jJ-RL8_yWnQTs_b8K6wtSGZu_bwkZWDmPMzlANgSsmbq33_2NUz1PukHdZnM/s640/installing+windows+service.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;pre class=&quot;lang-cs prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;str&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&amp;nbsp;After running the command windows service is installed in the system.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mesushil.blogspot.com/feeds/6150839238360262285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mesushil.blogspot.com/2019/01/installing-windows-service.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/6150839238360262285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/6150839238360262285'/><link rel='alternate' type='text/html' href='http://mesushil.blogspot.com/2019/01/installing-windows-service.html' title='Installing Windows Service '/><author><name>Sushil Sapkota</name><uri>http://www.blogger.com/profile/07245946363540402303</uri><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/AVvXsEgepfcefnIlpuuk18VLXUaDs1fY8yleEMrLFZbJDwtcwupMpLhtGvGwbpfcpsB93ooRB1SyvslxZGrMkE5jJ-RL8_yWnQTs_b8K6wtSGZu_bwkZWDmPMzlANgSsmbq33_2NUz1PukHdZnM/s72-c/installing+windows+service.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7546612190200798759.post-838944631362061710</id><published>2017-02-17T06:45:00.000-08:00</published><updated>2017-02-17T06:46:33.279-08:00</updated><title type='text'>6 Points to Learn Programming for Beginner&#39;s</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Learning programming isn&#39;t that hard neither that easy,But will be simplified once you are in a right direction and know how to.There are lot of things that you can do to making the learning easier.&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;Don&#39;t Move too Fast&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Learning is not a race, so keep calm and get it right before moving on, rather then quickly jumping for next. Thinking you know it all but you rarely did will be hindrance as you miss out the things and not have good good grasp of the fundamentals.&lt;br /&gt;
Take it as a continuous process and&amp;nbsp; don&#39;t stop try maintaining the pace till you have mastered the topic&lt;br /&gt;
&lt;br /&gt;
2. &lt;b&gt;Understand the Example Code &lt;/b&gt;&lt;br /&gt;
&amp;nbsp;Reading codes doesn&#39;t help you to write a program.What matters is understanding the code, so try to understand the code and always keep in mind start from the simple code don&#39;t flow on the words and go for complex code. Once you understand simple codes you will eventually grow yourself to understand the complexity.&lt;br /&gt;
&lt;br /&gt;
3.&lt;b&gt;Execute The Code&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Don&#39;t just be happy thinking that you have understood the code.You felt it and what you have felt might not really be.&amp;nbsp;So type the code in the editor or IDE and run it,But wait I just said type not copy.Make sure the code does what you have expected.Play with the code,make changes run and pacify yourself that now you have actually understood.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
4.&lt;b&gt;Think of Similar Examples and write your Code.&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Once you have understood the example codes, think of similar scenarios and try writing code to fulfill your expectation.You have any ideas,no ?&amp;nbsp;the ideas need not be big,still wondering what to code, search for other example codes from tutorials or books and go on with it.&lt;br /&gt;
&lt;br /&gt;
5.&lt;b&gt;Learn Debugging&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Good Programmers use Debuggers.Stepping through code line by line is the best way to trace the execution flow.Be familiar with the debugging tool you can use in the IDE. You might find using the debugger boring or time consuming but after few debugging you will find it comfortable and fast and know that it is the best friend for the programmer.&lt;br /&gt;
&lt;br /&gt;
6.&lt;b&gt;Stay Hungry, Learn More&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Don&#39;t be satisfied,go for more.We can find many tutorials floating over the internet and some are really good and can help &amp;nbsp;you understand even better and learn more.If you found difficulties search over and over and still you couldn&#39;t ask someone which is available to you and have a better understanding on the topic. But don&#39;t just rush to ask at once.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mesushil.blogspot.com/feeds/838944631362061710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mesushil.blogspot.com/2017/02/6-points-to-learn-programming-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/838944631362061710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/838944631362061710'/><link rel='alternate' type='text/html' href='http://mesushil.blogspot.com/2017/02/6-points-to-learn-programming-for.html' title='6 Points to Learn Programming for Beginner&#39;s'/><author><name>Sushil Sapkota</name><uri>http://www.blogger.com/profile/07245946363540402303</uri><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-7546612190200798759.post-2495727478771330503</id><published>2017-02-12T00:12:00.002-08:00</published><updated>2017-02-12T00:12:40.965-08:00</updated><title type='text'>Pivot in Oracle for Dynamic Columns</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Pivot in SQL refers to the change of rows into columns based on specific constraints.&lt;br /&gt;
An example of pivot could be the transpose of matrix.&lt;br /&gt;
Example:&lt;br /&gt;
a matrix containing day as 1st row and sales as 2nd row for &amp;nbsp;specific day&lt;br /&gt;
&lt;br /&gt;
sun &amp;nbsp; &amp;nbsp;10&lt;br /&gt;
mon &amp;nbsp;20&lt;br /&gt;
tue &amp;nbsp; &amp;nbsp;30&lt;br /&gt;
The transpose of the above matrix would be&lt;br /&gt;
&lt;br /&gt;
sun mon tue&lt;br /&gt;
10 &amp;nbsp;20 &amp;nbsp;30&lt;br /&gt;
&lt;br /&gt;
This is an example scenario of pivot in sql.&lt;br /&gt;
&lt;br /&gt;
Now, Lets get on to the actual tables in database and see how we can use pivot .&lt;br /&gt;
&lt;br /&gt;
Starting with a fictional scenario,&lt;br /&gt;
assume a table which contains two columns DAYS and SALES.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE TEST.DAILY_SALES&lt;br /&gt;
(&lt;br /&gt;
&amp;nbsp; DAYS &amp;nbsp; VARCHAR2(10),&lt;br /&gt;
&amp;nbsp; SALES &amp;nbsp;NUMBER&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
insert into DAILY_SALES(&#39;SUN&#39;,10);&lt;br /&gt;
insert into DAILY_SALES(&#39;MON&#39;,20);&lt;br /&gt;
insert into DAILY_SALES(&#39;TUE&#39;,15);&lt;br /&gt;
insert into DAILY_SALES(&#39;WED&#39;,25);&lt;br /&gt;
insert into DAILY_SALES(&#39;THU&#39;,10);&lt;br /&gt;
insert into DAILY_SALES(&#39;FRI&#39;,30);&lt;br /&gt;
insert into DAILY_SALES(&#39;SAT&#39;,5);&lt;br /&gt;
&lt;br /&gt;
Now when we execute the following select statement&lt;br /&gt;
select * from &amp;nbsp;TEST.DAILY_SALES&lt;br /&gt;
we get the output as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5gL5fIqJ1whGYMFpOA7h13HJ_HQd3LPD-Dnoc8s0FvkogVoXAUx6-3ZNZa9ws96rLqAWvcOYXm8PXlff8lVvu4zrfQicGwHCAlv01qdJmXYAwxvNPL-qVQlgBbH2EQZJZkuROQIWmZgc/s1600/SIMPLE+SELECT.PNG&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5gL5fIqJ1whGYMFpOA7h13HJ_HQd3LPD-Dnoc8s0FvkogVoXAUx6-3ZNZa9ws96rLqAWvcOYXm8PXlff8lVvu4zrfQicGwHCAlv01qdJmXYAwxvNPL-qVQlgBbH2EQZJZkuROQIWmZgc/s400/SIMPLE+SELECT.PNG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
Now lets select data using pivot&lt;br /&gt;
run the following script :&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;select * from &amp;nbsp;TEST.DAILY_SALES&lt;br /&gt;
pivot(max(SALES) for days in (&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39;SUN&#39;,&#39;MON&#39;,&#39;TUE&#39;,&#39;WED&#39;,&#39;THU&#39;,&#39;FRI&#39;,&#39;SAT&#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;)&lt;br /&gt;
or using alias for columns&lt;br /&gt;
&lt;br /&gt;
select * from &amp;nbsp;TEST.DAILY_SALES&lt;br /&gt;
pivot(max(SALES) for days in (&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;SUN&#39; AS &quot;SUN&quot;,&#39;MON&#39; AS &quot;MON&quot;,&#39;TUE&#39; AS &quot;TUE&quot;,&#39;WED&#39; AS &quot;WED&quot;,&#39;THU&#39; AS &quot;THU&quot;,&#39;FRI&#39; AS &quot;FRI&quot;,&#39;SAT&#39; AS &quot;SAT&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;)&lt;br /&gt;
&lt;br /&gt;
The out put result is as :&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwJOcUdzjzigxKWCfe_edWw84DhDsUdwx8ndZvKp06FJAN8hUPGhunGWjSa5EYVf4R-qzhPFu5nco_OOfFFLTnnZkTwnI0uTvzsb96dnINfsnlV9VdFsqRal5FUtzIfNmcKoj026esikA/s1600/PIVOT-RESULT.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/AVvXsEgwJOcUdzjzigxKWCfe_edWw84DhDsUdwx8ndZvKp06FJAN8hUPGhunGWjSa5EYVf4R-qzhPFu5nco_OOfFFLTnnZkTwnI0uTvzsb96dnINfsnlV9VdFsqRal5FUtzIfNmcKoj026esikA/s400/PIVOT-RESULT.PNG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here we get the different days as column names and sales as data for the specific column.&lt;br /&gt;
&lt;br /&gt;
I hope I could clarify purpose of pivot and its basic syntax is clear by now.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mesushil.blogspot.com/feeds/2495727478771330503/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mesushil.blogspot.com/2017/02/pivot-in-oracle-for-dynamic-columns.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/2495727478771330503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/2495727478771330503'/><link rel='alternate' type='text/html' href='http://mesushil.blogspot.com/2017/02/pivot-in-oracle-for-dynamic-columns.html' title='Pivot in Oracle for Dynamic Columns'/><author><name>Sushil Sapkota</name><uri>http://www.blogger.com/profile/07245946363540402303</uri><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/AVvXsEi5gL5fIqJ1whGYMFpOA7h13HJ_HQd3LPD-Dnoc8s0FvkogVoXAUx6-3ZNZa9ws96rLqAWvcOYXm8PXlff8lVvu4zrfQicGwHCAlv01qdJmXYAwxvNPL-qVQlgBbH2EQZJZkuROQIWmZgc/s72-c/SIMPLE+SELECT.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7546612190200798759.post-8127348054702395440</id><published>2017-02-12T00:11:00.001-08:00</published><updated>2017-02-12T00:11:26.850-08:00</updated><title type='text'>Login Sequence Diagram</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&amp;nbsp;Diagramatic representation of the &amp;nbsp;interaction between processes in their own order is&lt;br /&gt;
a Sequence Diagram.&lt;br /&gt;
A simple Sequence diagram for login is shown below:&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/AVvXsEi0Yru-T7W-fxV2BWJv7M9mI6PNKylK9SX20Xwb6dEMS0l2W2VmSRhzY7mOIZUoKfbn3qvLuo32XDbgbpsijYK-6heF3LwscK_jN73jCc485Ft9z_2FVe6O42Horl2pv6MQvMdUV0iRBGk/s1600/Login+Sequence+Diagram.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;323&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0Yru-T7W-fxV2BWJv7M9mI6PNKylK9SX20Xwb6dEMS0l2W2VmSRhzY7mOIZUoKfbn3qvLuo32XDbgbpsijYK-6heF3LwscK_jN73jCc485Ft9z_2FVe6O42Horl2pv6MQvMdUV0iRBGk/s1600/Login+Sequence+Diagram.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;
Short descriptions on notations used in the above diagram.&lt;br /&gt;
&lt;br /&gt;
Actor:&lt;br /&gt;
&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;An actor is an entity that interacts with the system&lt;br /&gt;
(can be human or any other process or entity that interacts with the system &amp;nbsp;).&lt;br /&gt;
&lt;br /&gt;
Call Message :&lt;br /&gt;
&amp;nbsp;Represents the forward communication between the entities .&lt;br /&gt;
&lt;br /&gt;
Return Message :&lt;br /&gt;
Represents the message passed back to the caller.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mesushil.blogspot.com/feeds/8127348054702395440/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mesushil.blogspot.com/2017/02/login-sequence-diagram.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/8127348054702395440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/8127348054702395440'/><link rel='alternate' type='text/html' href='http://mesushil.blogspot.com/2017/02/login-sequence-diagram.html' title='Login Sequence Diagram'/><author><name>Sushil Sapkota</name><uri>http://www.blogger.com/profile/07245946363540402303</uri><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/AVvXsEi0Yru-T7W-fxV2BWJv7M9mI6PNKylK9SX20Xwb6dEMS0l2W2VmSRhzY7mOIZUoKfbn3qvLuo32XDbgbpsijYK-6heF3LwscK_jN73jCc485Ft9z_2FVe6O42Horl2pv6MQvMdUV0iRBGk/s72-c/Login+Sequence+Diagram.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7546612190200798759.post-5424449934951918246</id><published>2015-03-31T10:43:00.001-07:00</published><updated>2015-03-31T10:43:21.170-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="@helper"/><category scheme="http://www.blogger.com/atom/ns#" term="asp.net"/><category scheme="http://www.blogger.com/atom/ns#" term="mvc"/><category scheme="http://www.blogger.com/atom/ns#" term="razor"/><category scheme="http://www.blogger.com/atom/ns#" term="recursion"/><title type='text'>Function in Razor view (@helper in razor)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
We can create function in cshtml by using @helper syntax&lt;br /&gt;
&lt;br /&gt;
syntax:&lt;br /&gt;
@helper &amp;lt;FunctionName&amp;gt;(paramtype param1)&lt;br /&gt;
{&lt;br /&gt;
//your custom logic&lt;br /&gt;
}&lt;br /&gt;
Here the function is same as the one we write in class file except &amp;nbsp;&quot;@helper&quot; .&lt;br /&gt;
This function can be invoked from any where in the view simply like this&lt;br /&gt;
@FunctionName(param1);&lt;br /&gt;
&lt;br /&gt;
@helper syntax enables in code reusability&lt;br /&gt;
scenario : Following code implements recursive function using @helper in view&lt;br /&gt;
&lt;br /&gt;
@helper Recurson(IEnumerable&amp;lt;Menu&amp;gt; nodes, int? parentId)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (nodes.Any(n =&amp;gt; n.ParentId == parentId))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @foreach (var node in nodes.Where(n =&amp;gt; n.ParentId == parentId))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;li&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @node.Name&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Recursion(node.Menus, node.Id)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Recurson(Model.Menus, Model.Id)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
In Above Code Menu Contains hierarchical data which will be iterated over to generate unordered list of the data.&lt;br /&gt;
&lt;br /&gt;
For Complete working &amp;nbsp;code please refer to my post : Implementing &amp;nbsp;JsTree in Asp.net MVC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mesushil.blogspot.com/feeds/5424449934951918246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mesushil.blogspot.com/2015/03/function-in-razor-view-helper-in-razor.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/5424449934951918246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/5424449934951918246'/><link rel='alternate' type='text/html' href='http://mesushil.blogspot.com/2015/03/function-in-razor-view-helper-in-razor.html' title='Function in Razor view (@helper in razor)'/><author><name>Sushil Sapkota</name><uri>http://www.blogger.com/profile/07245946363540402303</uri><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-7546612190200798759.post-6753081274850018938</id><published>2013-04-06T12:15:00.001-07:00</published><updated>2013-04-06T12:20:16.439-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp.net"/><category scheme="http://www.blogger.com/atom/ns#" term="jquery"/><category scheme="http://www.blogger.com/atom/ns#" term="SignalR"/><title type='text'>work out with SignalR</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
In this post i will be talking how we can use signalR for real time web application with a demo chat application.&lt;br /&gt;
If you are reading this post and don&#39;t know about installing the required files please have a look at my previous post.&lt;br /&gt;
&lt;a href=&quot;http://mesushil.blogspot.com/2013/04/introducing-signalr.html&quot;&gt;http://mesushil.blogspot.com/2013/04/introducing-signalr.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
here i am modifying the default asp.net template about.aspx page for the demo.&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhADochXds6dyxWas1rcG301iWZFzzNm5u_ZttX313-fReTJu6qT3emBP-qVdnnmVwcoyyMrSnpiXKjxiCFYVINJh9jA0whsCN5D9k85kq-ZWqlwje_vt0WFKY7iUYo8OfVyS0rA6fZ_No/s1600/including+js+in+signalR.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;36&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhADochXds6dyxWas1rcG301iWZFzzNm5u_ZttX313-fReTJu6qT3emBP-qVdnnmVwcoyyMrSnpiXKjxiCFYVINJh9jA0whsCN5D9k85kq-ZWqlwje_vt0WFKY7iUYo8OfVyS0rA6fZ_No/s320/including+js+in+signalR.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Firstly include the script in the .aspx page .&lt;br /&gt;
the second js i have included here is the js downloaded by the nuget.&lt;br /&gt;
the third file is generated at run time including the hubs declared in the server.&lt;br /&gt;
check the browser to ensure these files are loaded in the browser.&lt;br /&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/AVvXsEjET9V5gBiIWRuJ3c6HWt3Emat4W8ekUMQugrZEZC0oiKK_OBS1RBmtCSL6Hbdqr6GiEoGBj1HCoO4OHsMVhHP9xmJsqT580V7vDktUGnx8mK2avVYwtFJDhzpj7xt2mePbNCMiWvDMb1w/s1600/hubs+js.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;53&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjET9V5gBiIWRuJ3c6HWt3Emat4W8ekUMQugrZEZC0oiKK_OBS1RBmtCSL6Hbdqr6GiEoGBj1HCoO4OHsMVhHP9xmJsqT580V7vDktUGnx8mK2avVYwtFJDhzpj7xt2mePbNCMiWvDMb1w/s320/hubs+js.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;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
the image above is the part of hubs.js generated dynamically.&lt;br /&gt;
now lets create hub in the server.for this lets include a class file to the solution.&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/AVvXsEhU-J-5DEIpLdBMdBjW172eYBXjWDG6Xz0hb3ACV-FpR-x9Z-v-cXCXVayd0G8lknLi78FOQ45BxXoXc0RpoT4UwKgV7eQQ0Lon-tpnWvU37gygZhP5v2ihtsab0QWipxjyBgeW_76ze4w/s1600/ServerHubs.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;153&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhU-J-5DEIpLdBMdBjW172eYBXjWDG6Xz0hb3ACV-FpR-x9Z-v-cXCXVayd0G8lknLi78FOQ45BxXoXc0RpoT4UwKgV7eQQ0Lon-tpnWvU37gygZhP5v2ihtsab0QWipxjyBgeW_76ze4w/s320/ServerHubs.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
To create the hubs in server add the namespace as the first two lines above.&lt;br /&gt;
hubName in line 9 is what we will be referring in client side js to communicate with the server.&lt;br /&gt;
and the next is the method which i will invoke from client side to notify all the users connected to the hub.&lt;br /&gt;
&lt;br /&gt;
now moving to the client side.&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZZkw-eYv6jihMLjqFptBXOvqwZK0YmzNtW4pFnQUi04oZpJI6y8SrX_KJUYdRKLNfEuchWDxweeZybDy5wjGz9eTGZj8B45vk2lFq8GzMe9R-oGByvdaHPiA8ye-fNJflsqtLhfs3OVw/s1600/clientSide+js.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;266&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZZkw-eYv6jihMLjqFptBXOvqwZK0YmzNtW4pFnQUi04oZpJI6y8SrX_KJUYdRKLNfEuchWDxweeZybDy5wjGz9eTGZj8B45vk2lFq8GzMe9R-oGByvdaHPiA8ye-fNJflsqtLhfs3OVw/s320/clientSide+js.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
referring the image above:&lt;br /&gt;
firstly we need bind the hub we have created in the server(line 31).&lt;br /&gt;
then to communicate with the server hub we need to establish connection(line 35).&lt;br /&gt;
after we have connected with the hub we are ready to communicate with the server.&lt;br /&gt;
(line 46) invokes the BroadCast message in the server and here i have passed two parameters.&lt;br /&gt;
&lt;br /&gt;
similarly ,the server can also invoke the method in the client .&lt;br /&gt;
(line 49) is invokable by the server.&lt;br /&gt;
If you refer to the second image the client method is invoked from the server side.&lt;br /&gt;
i.e when an event occurs in the sever side the server is able to push messege to the client.&lt;br /&gt;
but remember don&#39;t have the same methods in client and server.&lt;br /&gt;
&lt;br /&gt;
That&#39;s all we need to achieve the real time functionality using signalR.&lt;br /&gt;
I haven&#39;t described the different terms in signalR and the transportation available&lt;br /&gt;
but hope this helps you go with a functional start.&lt;br /&gt;
&lt;br /&gt;
The demo project is hosted in github and you can download it from here:&lt;br /&gt;
&lt;b&gt;https://github.com/zeewons/SignalRDemo&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;Reference:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;https://github.com/SignalR/SignalR/&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;span style=&quot;background-color: #141414; color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 22px;&quot;&gt;This post is based on my knowledge and may not be the accurate solution or may change over time.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #141414; color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 22px;&quot;&gt;comments are welcome&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #141414; color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 22px;&quot;&gt;Thanks for your time.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #141414; color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 22px;&quot;&gt;Regards,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #141414; color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 22px;&quot;&gt;sushil&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mesushil.blogspot.com/feeds/6753081274850018938/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mesushil.blogspot.com/2013/04/in-this-post-i-will-be-talking-how-we.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/6753081274850018938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/6753081274850018938'/><link rel='alternate' type='text/html' href='http://mesushil.blogspot.com/2013/04/in-this-post-i-will-be-talking-how-we.html' title='work out with SignalR'/><author><name>Sushil Sapkota</name><uri>http://www.blogger.com/profile/07245946363540402303</uri><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/AVvXsEhADochXds6dyxWas1rcG301iWZFzzNm5u_ZttX313-fReTJu6qT3emBP-qVdnnmVwcoyyMrSnpiXKjxiCFYVINJh9jA0whsCN5D9k85kq-ZWqlwje_vt0WFKY7iUYo8OfVyS0rA6fZ_No/s72-c/including+js+in+signalR.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7546612190200798759.post-6851156588645577407</id><published>2013-04-02T11:41:00.002-07:00</published><updated>2013-04-02T11:41:38.348-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SignalR"/><title type='text'>Introducing SignalR</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
Introduction:&lt;br /&gt;
Asp.net signalR is an open source library for asp.net developers.it is used to implement real time functionality in web application.&lt;br /&gt;
requirements:&lt;br /&gt;
signalR is not included in visual studio so far(vs 10 and vs 12) by default.It can be implemented in .net framework 4.0 and higher.&lt;br /&gt;
so you need vs 2010 or vs 2012 to start taking the advantage of signalR.&lt;br /&gt;
&lt;br /&gt;
I will guide you trough the installation of signalR for your project .&lt;br /&gt;
Lets get ready with the visual studio 2010 or 2012.&lt;br /&gt;
I am going to use visual studio 2012 here.&lt;br /&gt;
&lt;br /&gt;
Firstly open up a new project.&lt;br /&gt;
now open a Package Manager Console.&lt;br /&gt;
if you didn&#39;t find it click View and go over to other window you find it there or&lt;br /&gt;
go to Tools&amp;gt;Library Package Manager Console &amp;gt;Package Manager Console&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;make a command in console :Install-Package Microsoft.AspNet.signalR&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5u8DjaeLlz9NXWRR69PPMKIdqqJkgwejDL3UvrwmiPBmgS_GcisfiXyJAQ69A06VuG2ftxeXM3dxiL-CeFEWdwKDumulxOebHjHkODQCj6fzPnTGgk2TEHUbhbZMCkIDuCu7gXp4UKlQ/s1600/install+signalR.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;26&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5u8DjaeLlz9NXWRR69PPMKIdqqJkgwejDL3UvrwmiPBmgS_GcisfiXyJAQ69A06VuG2ftxeXM3dxiL-CeFEWdwKDumulxOebHjHkODQCj6fzPnTGgk2TEHUbhbZMCkIDuCu7gXp4UKlQ/s320/install+signalR.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Scroll down the generated text in console few files are downloaded which contains the asp.net server side&lt;br /&gt;
&amp;nbsp;signaR and client side signalR js &amp;nbsp;along its dependency files .&lt;br /&gt;
&amp;nbsp;I won&#39;t be elaborating it but do give it a glance on your console.&lt;br /&gt;
&amp;nbsp;the references added to the project look something like this&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/AVvXsEhdizpnGVU0FFBMTiWvLvpKPWdVZa-7XymlaGIVa-7OEwKnRwff_Mgfi2jLfR1ps69bAorI8RchQ08rxJ6cmG39u7V8BOH3rHXXW8g5YdcaB4hBEsZtl3g4RMSuaQRNsGvEh7TCVX7ByCc/s1600/Refrences+added.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;131&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdizpnGVU0FFBMTiWvLvpKPWdVZa-7XymlaGIVa-7OEwKnRwff_Mgfi2jLfR1ps69bAorI8RchQ08rxJ6cmG39u7V8BOH3rHXXW8g5YdcaB4hBEsZtl3g4RMSuaQRNsGvEh7TCVX7ByCc/s320/Refrences+added.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp;Ah ! i just forget to tell about nuget packages.&lt;br /&gt;
&amp;nbsp;if yo have time go through this link:&lt;br /&gt;
&amp;nbsp;http://docs.nuget.org/docs/start-here/overview&lt;br /&gt;
&amp;nbsp;and for a first quick grasp&lt;br /&gt;
&amp;nbsp;nuget is a visual studio extension that makes it easy to add,remove and update libraries.....&lt;br /&gt;
&amp;nbsp; I have just installed a signalR package from nuget.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; after the successful installation it creates a folder (packages) below the your project solution.&lt;br /&gt;
&amp;nbsp; if you can&#39;t see it open up the solution in folder explorer.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; Now we have all the required files we need for our project.&lt;br /&gt;
&lt;br /&gt;
You are ready to go with the signalR in your project.&lt;br /&gt;
&lt;br /&gt;
The use of &amp;nbsp;signalR with a simple demo application will be in my next post.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;line-height: 22px;&quot;&gt;This post is based on my knowledge and may not be the accurate solution or may change over time.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;line-height: 22px;&quot;&gt;comments are welcome&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;line-height: 22px;&quot;&gt;Thanks for your time.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;line-height: 22px;&quot;&gt;Regards,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;line-height: 22px;&quot;&gt;sushil&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mesushil.blogspot.com/feeds/6851156588645577407/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mesushil.blogspot.com/2013/04/introducing-signalr.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/6851156588645577407'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7546612190200798759/posts/default/6851156588645577407'/><link rel='alternate' type='text/html' href='http://mesushil.blogspot.com/2013/04/introducing-signalr.html' title='Introducing SignalR'/><author><name>Sushil Sapkota</name><uri>http://www.blogger.com/profile/07245946363540402303</uri><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/AVvXsEi5u8DjaeLlz9NXWRR69PPMKIdqqJkgwejDL3UvrwmiPBmgS_GcisfiXyJAQ69A06VuG2ftxeXM3dxiL-CeFEWdwKDumulxOebHjHkODQCj6fzPnTGgk2TEHUbhbZMCkIDuCu7gXp4UKlQ/s72-c/install+signalR.PNG" height="72" width="72"/><thr:total>3</thr:total></entry></feed>