-
Linq- AsEnumerable and AsQueryable ~ CodeAddict
SELECT [t0].[ID], [t0].[Name], [t0].[Gender], [t0].[Salary]
FROM [dbo].[Employees] AS [t0]
AsEnumerable operator breaks the
query into 2 parts
1.
The "inside part" that is the query before AsEnumerab...
-
When to use Keep() vs Peek() with TempData in ASP.NET MVC ~ CodeAddict
TempData is used to pass data from current request to subsequent request (means redirecting from one page to another). It’s life is very...
-
ASP.NET CORE: Sending Email with Gmail and Hotmail Account using ASP.NET Core services ~ CodeAddict
Monday, March 04, 2019
Vikas Sharma
Sending email from any SMTP server from ASP.NET CORE application is pretty easy, but the flow of command is slight different in core environment.
Gmail SMTP...
-
ASP.NET MVC - Required Checkbox with Data Annotations ~ CodeAddict
Thursday, May 07, 2015
Vikas Sharma
I just stumbled across this neat way of making a required checkbox using the built in 'Range' data annotation attribute:
namespace MvcRequiredCheckbox
-
X.PagedList.Mvc -1 ~ CodeAddict
@Html.PagedListPager(Model,
page => Url.Action("PagingEx", new { page
}), PagedListRenderOptions.ClassicPlusFirstAndLast)
Showing @Model.FirstItemOnPage to @Model.LastItemOnPage
of @Model...
-
Extension method ~ CodeAddict
}
Enumerable Class as
Extension methods on the IEnumerable<T> interface.
eg. List<int> Numbers = new List<int> {1,2,3,4,5,6,7,8,9,10};
IEnumerable<int> EvenNumbers = Numbers.Where( n =>
n%2 == 0);
...