tag:blogger.com,1999:blog-6082652835152798567.post4810185790659955888..comments2024-03-28T00:58:12.736-07:00Comments on Sql server, .net and c# video tutorial: Part 7 - Models in an mvc applicationUnknownnoreply@blogger.comBlogger10125tag:blogger.com,1999:blog-6082652835152798567.post-35761742435835658852018-09-06T03:11:06.711-07:002018-09-06T03:11:06.711-07:00Can u Use Collection means return or get out put a...Can u Use Collection means return or get out put as collection for Example, <br />ViewBag.nameList = new List { "na", "pa", "sa" };<br /><br />u will do now this <br />@ViewData["orderlist"]; <br><br /><br />can u try this is working fine <br />@foreach (var item in @ViewBag.nameList)<br />{<br /> @item; <br><br />}<br /><br /><br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-20649805500725568152018-04-27T12:29:51.573-07:002018-04-27T12:29:51.573-07:00I Am getting tgis error ... I Am getting tgis error The parameters dictionary contains a null entry for parameter 'id' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult Details(Int32)' in 'MVCModel.Controllers.EmployeeController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.<br />Parameter name: parameters <br /><br /><br /><br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-48882025931839631062017-06-06T02:11:15.910-07:002017-06-06T02:11:15.910-07:00use [key] and data annotation libraryuse [key] and data annotation libraryAnonymoushttps://www.blogger.com/profile/12127452890178616943noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-41418668793558885172016-10-11T09:07:33.825-07:002016-10-11T09:07:33.825-07:00Fantastic Videos to make simple a very difficult c...Fantastic Videos to make simple a very difficult concept like MVCAjay kumar pandeyhttps://www.blogger.com/profile/16210459510373657869noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-40179046600436223062015-06-29T04:57:42.770-07:002015-06-29T04:57:42.770-07:00if you will use view bags or view data . there is ...if you will use view bags or view data . there is higher probability getting error. it is advisable to use Model structure.Haribansh Agrawalhttps://www.blogger.com/profile/02698340482806549934noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-51774592969073563322014-11-20T23:47:15.465-08:002014-11-20T23:47:15.465-08:00[Table("Employee")]
public class Emp... [Table("Employee")]<br /> public class Employee<br /> {<br /> [Key]<br /> public int EmpId { get; set; }<br /><br /> [Required]<br /> public string Name { get; set; }<br /> public string Gender { get; set; }<br /> public string City { get; set; }<br /> }Anonymoushttps://www.blogger.com/profile/14774674908772760619noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-13050979155587690302014-09-29T09:18:18.025-07:002014-09-29T09:18:18.025-07:00Viewbags/Viewdata should not be used. Bad practice...Viewbags/Viewdata should not be used. Bad practice. Stay inside MVC and use the MODEL.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-83774844471510185292013-10-20T21:05:10.532-07:002013-10-20T21:05:10.532-07:00Once UpdateYou are Entity ModelOnce UpdateYou are Entity ModelAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-67024542372244127252013-08-09T05:02:49.689-07:002013-08-09T05:02:49.689-07:00same problem with me, i think that problem is in E...same problem with me, i think that problem is in Entity, i need solution for this!<br /><br />Is your database local or in the SQL Server provider?<br /><br />thx Anonymoushttps://www.blogger.com/profile/01419320798296164305noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-18328799449868940702013-05-22T12:45:53.288-07:002013-05-22T12:45:53.288-07:00Great videos! I'm receiving an error when try...Great videos! I'm receiving an error when trying to view data from my database though that says a primary key has not been defined. However, I do have my Category_ID column set as a primary key in the database. How do I handle this exception. I'm very new to MVC and coding in general so any help is much appreciated!Dacia Turnerhttps://www.blogger.com/profile/16013607795197628019noreply@blogger.com