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.
Exception Details: System.Data.SqlClient.SqlException: Invalid object name 'dbo.tbl_Users'.
Source Error:
Line 13: protected void Page_Load(object sender, EventArgs e)
Line 14: {
Line 15: var CountTeacher = (from a in database.tbl_Users select a).Count();
Line 16: lbtnCountTeacher.Text = CountTeacher + " " + "مدرس";
Line 17: //
Source File: D:\Samane_Daneshjooyar\Samane_Daneshjooyar\Samane_Daneshjooyar\Default.aspx.cs Line: 15
سلام ببخشید این مشکل مال چیه ؟ سی شارپ اجرا نمیشد
لطفا کد های خود را با فرمت کد قرار دهید.
میگه این جدول رو نمیتونه پیدا کنه
مدل را آپدیت کنید و تست کنید
سلام من مدل و آپدیت کردم ولی این ارور داد
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.
Exception Details: System.Data.Entity.Core.MappingException: Schema specified is not valid. Errors:
Model1.msl(3,4) : error 2062: No mapping specified for instances of the EntitySet and AssociationSet in the EntityContainer SamaneDBEntities.
Source Error:
Line 13: protected void Page_Load(object sender, EventArgs e)
Line 14: {
Line 15: var CountTeacher = (from a in database.tbl_Users select a).Count();
Line 16: lbtnCountTeacher.Text = CountTeacher + " " + "مدرس";
Line 17: //
میشه توضیح بدهید چکونه آپدیت کنم
فکر میکنم مدل شما دچار مشکل شده است
یکبار مدل را کامل حذف کنید و دوباره ایجاد کنید
به احتمال زیاد مشکل برطرف خواهد شد
هیچ کاربری تا کنون از این پست تشکر نکرده است
با ما تماس بگیرید تا در این مسیر همراهتان باشیم :)