by Yogesh | Apr 14, 2018 | Asp .net MVC, Entity Framework Tutorial
Database : -- Login Table CREATE TABLE [dbo].[login]( [id] [int] IDENTITY(1,1) NOT NULL, [username] [varchar](50) NULL, [password] [nvarchar](50) NULL, [lastlogin] [datetime] NULL ) ON [PRIMARY] GO SET ANSI_PADDING OFF GO -- Stored Procedure -- Stored Procedure to...
by Yogesh | Apr 10, 2018 | Asp .net MVC, Entity Framework Tutorial
As we know that whenever we want to pass dropdown text from view to controller using the model object, the value of dropdown is transferred but in some cases, we required text of the drop-down. in this article I discuss that how we can perform this. Step1: Create New...
by Yogesh | Mar 10, 2018 | Asp .net MVC, Entity Framework Tutorial
In this example, I am going to create two tables(MainMenu, SubMenu) Database Script for database tables CREATE TABLE [dbo].[MainMenu]( [id] [int] IDENTITY(1,1) NOT NULL, [menuname] [varchar](max) NULL, [menuurl] [nvarchar](max) NULL, CONSTRAINT [PK_MainMenu] PRIMARY...
by Yogesh | Feb 27, 2018 | Asp .net MVC, Entity Framework Tutorial
.cshtml @model RegistrationForm.Models.Employee @{ ViewBag.Title = "Create"; } Create @using (Html.BeginForm()) { @Html.AntiForgeryToken() Employee @Html.ValidationSummary(true, "", new { @class = "text-danger" }) @Html.LabelFor(model => model.EmpName,...
by Yogesh | Oct 22, 2017 | Asp .net MVC, Entity Framework Tutorial
Example of Checkboxfor helper with entity framework Html helper class have two methods to generate checkboxes( Checkbox() –Loosely Typed MvcHtmlString CheckBox(string name, bool isChecked, object htmlAttributes) Checkboxfor() –Strongly Typed (It...
by Yogesh | Oct 14, 2017 | Asp .net MVC, Entity Framework Tutorial
What is Repository Pattern 1.reduces repetitive code and separates the Data Access and Business Logic Used for resuability 2.Easy for further changes. How to implement Repository Pattern 1.Create an interface.- Define all CRUD functions for 2.A class implement...