tag:blogger.com,1999:blog-6082652835152798567.post1434323943823600339..comments2024-03-28T21:41:58.974-07:00Comments on Sql server, .net and c# video tutorial: Part 11 - Using business objects as model in mvcUnknownnoreply@blogger.comBlogger55125tag:blogger.com,1999:blog-6082652835152798567.post-4469336542030799102020-12-18T00:23:29.365-08:002020-12-18T00:23:29.365-08:00Hi Sir, I have got this problem when working in Vi...<br />Hi Sir, I have got this problem when working in Visual Studio 2019. Compile error on line " @Html.DisplayNameFor"<br /><br />Error CS0012 The type 'Expression<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. 2_Views_Employee_Index.cshtml <br /><br />How should we resolve it sir?<br />Lakshmi Kinnerahttps://www.blogger.com/profile/14241707954716921965noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-59618135165712578042019-08-19T20:45:04.195-07:002019-08-19T20:45:04.195-07:00Hi,
This problem,
How can I solve this ...?
the t...Hi,<br />This problem,<br />How can I solve this ...?<br /><br />the type or namespace name 'models' does not exist in the namespace (are you missing an assembly refarence) in mvcRokibuzzamanhttps://www.blogger.com/profile/15636532665828848959noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-13376495501816953412019-07-30T13:23:16.118-07:002019-07-30T13:23:16.118-07:00employees is a list. so in order to add an employe...employees is a list. so in order to add an employee object, we use Add.Anonymoushttps://www.blogger.com/profile/08625198110743998193noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-84252370049980283012019-07-27T09:40:12.890-07:002019-07-27T09:40:12.890-07:00Please build your solution once before adding the ...Please build your solution once before adding the view and the model classes will show up. Please let us know if this has helped.Venkathttps://www.blogger.com/profile/11295753737388828672noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-8904674553374671592019-07-27T07:40:27.567-07:002019-07-27T07:40:27.567-07:00I am able to create strongly typed view because mo...I am able to create strongly typed view because model class is not appearing at the time of creating view .Anonymoushttps://www.blogger.com/profile/16080374575611449051noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-15342133930484620852019-03-09T01:12:50.913-08:002019-03-09T01:12:50.913-08:00Hi Can anybody help me I am getting error at this ...Hi Can anybody help me I am getting error at this position.<br /><br />Could not find stored procedure 'spGetAllEmployee'.<br />Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. <br /><br />Exception Details: System.Data.SqlClient.SqlException: Could not find stored procedure 'spGetAllEmployee'.<br /><br />Source Error: <br /><br /><br />Line 24: cmd.CommandType = System.Data.CommandType.StoredProcedure;<br />Line 25: con.Open();<br />Line 26: SqlDataReader rdr = cmd.ExecuteReader();<br />Anonymoushttps://www.blogger.com/profile/10127589649362631982noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-81755350327392689112019-03-09T00:50:17.454-08:002019-03-09T00:50:17.454-08:00Hi Can Anybody help me I am getting such kinds of ...Hi Can Anybody help me I am getting such kinds of error.<br /><br />con.Open();<br />SqlDataReader rdr = cmd.ExecuteReader();<br /><br /><br />System.Data.SqlClient.SqlException: 'Could not find stored procedure 'spGetAllEmployee'.'Anonymoushttps://www.blogger.com/profile/10127589649362631982noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-56663345019787112052019-01-14T16:25:52.666-08:002019-01-14T16:25:52.666-08:00I am facing the error saying :=
NullRefferenceExc...I am facing the error saying := <br />NullRefferenceException was unhandled by user code<br /><br />Object reference not set to an instance of an object.<br /><br />pointing to---> string connectionString = ConfigurationManager.ConnectionStrings["DBCS"].ConnectionString;<br /><br />please help me in this.Anonymoushttps://www.blogger.com/profile/07866070519112985965noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-24949652117226515782018-12-30T02:55:09.570-08:002018-12-30T02:55:09.570-08:00sir , am getting an error
System.IndexOutOfRangeE...sir , am getting an error <br />System.IndexOutOfRangeException: 'Id'<br />while running<br />please helpansuhttps://www.blogger.com/profile/03495209798072860545noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-9287217693630205402018-12-09T19:17:08.465-08:002018-12-09T19:17:08.465-08:00i am using visual studio 2015
while adding view t...i am using visual studio 2015 <br />while adding view to index() method<br />it is not showing class of business layer...<br />Can some one help me.<br />1) I clear projects and rebuild, but not success ed.<br />2) I try to update NuGet packages but not help full...Rahul Dev Katarahttps://www.blogger.com/profile/12794006078754434252noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-16190875122747425112018-12-07T10:30:50.168-08:002018-12-07T10:30:50.168-08:00You might have to add both ConfigurationManager an...You might have to add both ConfigurationManager and Data.SqlClient via NuGet for VS 2017. <br /><br />Ref: https://social.msdn.microsoft.com/Forums/en-US/ec2361a3-1931-4423-bf68-08b206ce67aa/reference-systemdatasqlclient-not-found?forum=netfxbclAnonymoushttps://www.blogger.com/profile/03790652933721397622noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-14591724817265085562018-12-02T19:00:14.863-08:002018-12-02T19:00:14.863-08:00Go to references on your project solution then rig...Go to references on your project solution then right click by mouse and choose add references, search for the references (System.Configuration) then Ok.Anonymoushttps://www.blogger.com/profile/11203483115950972487noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-42701463616058955672018-08-17T05:07:12.903-07:002018-08-17T05:07:12.903-07:00Implicit conversion from data type datetime to int...Implicit conversion from data type datetime to int is not allowed. Use the CONVERT function to run this query.Anonymoushttps://www.blogger.com/profile/13291445840216863232noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-4114874654161588962018-08-06T05:04:41.745-07:002018-08-06T05:04:41.745-07:00Hi, when I am unable to get the employee model in ...Hi, when I am unable to get the employee model in dropdown list of creating view, can you guide me on thisAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-44482578486324511762018-07-22T07:56:54.061-07:002018-07-22T07:56:54.061-07:00Hi ,
Where we will get DB schema like table scrip...Hi ,<br /><br />Where we will get DB schema like table script ?Anonymoushttps://www.blogger.com/profile/00490284094335070802noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-86163332094191607602018-05-28T22:46:52.121-07:002018-05-28T22:46:52.121-07:00Right Way :--
@foreach (var item in @Model)Right Way :--<br />@foreach (var item in @Model)underground dragonhttps://www.blogger.com/profile/16283129578153218782noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-32571367311085711942018-05-04T03:48:40.122-07:002018-05-04T03:48:40.122-07:00Great Contents, undoubtedly. Would you make video ...Great Contents, undoubtedly. Would you make video on two relational database tables (one to many relationship) where one can perform CRUD on them (using MVC)?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-35487580197579275942018-03-16T10:45:47.230-07:002018-03-16T10:45:47.230-07:00any help Im getting this error
An exception of ty...any help Im getting this error <br />An exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll but was not handled in user code<br /><br />Additional information: Cannot open database "signup" requested by the login. The login failed.<br />i know its connection string but i did as the same as the video Anonymoushttps://www.blogger.com/profile/17836835883194553376noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-59981181215962077862018-03-16T10:42:16.066-07:002018-03-16T10:42:16.066-07:00can anybody tell me why is the connection string d...can anybody tell me why is the connection string dont work <br />i tried to use the same as the video <br />and i also tried to change to initial catalog which is my database <br />it still gives me error cannot open <br />there is the error Anonymoushttps://www.blogger.com/profile/17836835883194553376noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-83996091430452058192018-03-13T03:50:25.398-07:002018-03-13T03:50:25.398-07:00Check with your Employee Class, May be you are usi...Check with your Employee Class, May be you are using as int<br />as below you can change<br /> public class Employee<br /> {<br /> public int ID { get; set; }<br /> public string Name { get; set; }<br /> public string Gender { get; set; }<br /> public string City { get; set; }<br /> public DateTime DateOfBirth { get; set; }<br /> }Anonymoushttps://www.blogger.com/profile/12318771963047298497noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-24176086246863546332018-03-13T02:00:44.088-07:002018-03-13T02:00:44.088-07:00Please follow below it will resolve
Employee emplo...Please follow below it will resolve<br />Employee employee = new Employee();<br /> employee.ID = Convert.ToInt32(rdr["Id"]);<br /> employee.Name = int.Parse(rdr["Name"].ToString());<br /> employee.Gender = int.Parse(rdr["Gender"].ToString());<br /> employee.City = int.Parse(rdr["City"].ToString());<br /> employee.DateOfBirth = Convert.ToDateTime(rdr["DateOfBirth"]);Anonymoushttps://www.blogger.com/profile/12318771963047298497noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-86654001092846710782018-02-26T02:49:43.181-08:002018-02-26T02:49:43.181-08:00Severity Code Description Project File Line Suppre...Severity Code Description Project File Line Suppression State<br />Error CS0246 The type or namespace name 'ApplicationUser' could not be found (are you missing a using directive or an assembly reference?) buisnesslayerpart11 E:\Study Stuff\MVC\buisnesslayerpart11\buisnesslayerpart11\App_Start\IdentityConfig.cs 92 Active<br />iam getting this error while iam running the codeAnonymoushttps://www.blogger.com/profile/11720154018267335081noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-47073732139421647252018-01-29T04:41:07.768-08:002018-01-29T04:41:07.768-08:00 List emp = employeebusinesslayer.Employees.ToList... List emp = employeebusinesslayer.Employees.ToList();<br /><br />Getting error at Employees.but it is property: IEnumerableEmployees , declared in EmployeeBusinessLayer... RHhttps://www.blogger.com/profile/18012884767955041586noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-24012472481467187362017-12-29T04:14:24.682-08:002017-12-29T04:14:24.682-08:00Father of MS.Net technologies. Thank you very much...Father of MS.Net technologies. Thank you very much sir, for giving us all these much of stuff..Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-82381735078326833352017-12-15T09:11:41.438-08:002017-12-15T09:11:41.438-08:00I am facing the error saying :=
NullRefferenceExc...I am facing the error saying := <br />NullRefferenceException was unhandled by user code<br /><br />Object reference not set to an instance of an object.<br /><br />pointing to---> string connectionString = ConfigurationManager.ConnectionStrings["DBCS"].ConnectionString;<br /><br />please help me in this.Anonymousnoreply@blogger.com