Click here to Skip to main content
15,887,135 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: issue while running as asp.net application over wan Pin
Member 119197226-Oct-15 19:33
Member 119197226-Oct-15 19:33 
GeneralRe: issue while running as asp.net application over wan Pin
Richard Deeming7-Oct-15 2:37
mveRichard Deeming7-Oct-15 2:37 
GeneralRe: issue while running as asp.net application over wan Pin
Member 119197227-Oct-15 18:45
Member 119197227-Oct-15 18:45 
GeneralRe: issue while running as asp.net application over wan Pin
Member 119197226-Oct-15 20:41
Member 119197226-Oct-15 20:41 
GeneralRe: issue while running as asp.net application over wan Pin
F-ES Sitecore6-Oct-15 23:20
professionalF-ES Sitecore6-Oct-15 23:20 
GeneralRe: issue while running as asp.net application over wan Pin
Member 119197227-Oct-15 0:10
Member 119197227-Oct-15 0:10 
QuestionI have a form with a gridview. When clicking one row I want it to pass the data to a second form that already exist. Pin
Paul Hacker5-Oct-15 7:51
Paul Hacker5-Oct-15 7:51 
QuestionCan't load data from SQL Compact Edition database - MVC 4 Pin
Member 120616005-Oct-15 0:45
Member 120616005-Oct-15 0:45 
I am following this tutorial: http://www.w3schools.com/aspnet/mvc_models.asp, to get data from SQL CE using Entity Framework. There doesn't seem to be much code. The tutorial is for MVC3 but my project is MVC4, but I think major steps should be same.

I created a SQL CE database, and a table with needed columns.
Added data to the table.
On the C# side I have

C#
namespace MvcDemoApp.Models
   {
       public class Employee
       {
           public int EmployeeID { get; set; }
           public string Name { get; set; }
           public string Gender { get; set; }
           public string City { get; set; }

       }

       public class EmployeeContext : DbContext
       {
           public DbSet<Employee> employees { get; set; }
       }
   }


And code in respective controller

C#
public ActionResult Index()
  {
             var c = db.employees.ToList();
             return View(c);
  }


That sample is for movies database, I changed all relevant info to employees.
I added the connection string as in that tutorial too.
But when I navigate to the Index page of above controller, the empty list is returned. What did I miss?

It seems I gave correct meaning to table columns too (e.g. similar to Employee class properties)

PS. This is how the DB looks after I stop running the app
image
QuestionI can download file from listbox but I want it to save in specific folder in local... Pin
Member 120161064-Oct-15 23:15
Member 120161064-Oct-15 23:15 
AnswerRe: I can download file from listbox but I want it to save in specific folder in local... Pin
JHizzle5-Oct-15 0:41
JHizzle5-Oct-15 0:41 
QuestionI want to download file from list box. Could anyone help? Pin
Member 120161064-Oct-15 20:07
Member 120161064-Oct-15 20:07 
AnswerRe: I want to download file from list box. Could anyone help? Pin
Richard MacCutchan4-Oct-15 22:05
mveRichard MacCutchan4-Oct-15 22:05 
GeneralRe: I want to download file from list box. Could anyone help? Pin
Member 120161064-Oct-15 22:51
Member 120161064-Oct-15 22:51 
QuestionVS2015 - MVC - Getting a list of users for Admin Panel Pin
DeerBear3-Oct-15 2:05
DeerBear3-Oct-15 2:05 
Questionuse Ajax controls in handlebar template with HandelBar & Asp.net & Ajax Pin
mahadevkarekar2-Oct-15 1:22
mahadevkarekar2-Oct-15 1:22 
QuestionOpen files from listbox file listing in c# Pin
Member 120161061-Oct-15 17:26
Member 120161061-Oct-15 17:26 
AnswerRe: Open files from listbox file listing in c# Pin
Wendelius1-Oct-15 17:42
mentorWendelius1-Oct-15 17:42 
GeneralRe: Open files from listbox file listing in c# Pin
Member 120161061-Oct-15 17:58
Member 120161061-Oct-15 17:58 
GeneralRe: Open files from listbox file listing in c# Pin
Member 120161061-Oct-15 20:42
Member 120161061-Oct-15 20:42 
GeneralRe: Open files from listbox file listing in c# Pin
Wendelius1-Oct-15 21:02
mentorWendelius1-Oct-15 21:02 
GeneralRe: Open files from listbox file listing in c# Pin
Member 120161061-Oct-15 21:14
Member 120161061-Oct-15 21:14 
QuestionApp_GlobalResources and resx files, cannot find appropriate culture Pin
jkirkerx1-Oct-15 9:34
professionaljkirkerx1-Oct-15 9:34 
Answer[Solved] Re: App_GlobalResources and resx files, cannot find appropriate culture, masterpage Pin
jkirkerx1-Oct-15 13:50
professionaljkirkerx1-Oct-15 13:50 
Questionstart date end date not working Pin
Ekrem Tapan30-Sep-15 23:43
Ekrem Tapan30-Sep-15 23:43 
AnswerRe: start date end date not working Pin
Wendelius1-Oct-15 8:40
mentorWendelius1-Oct-15 8:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.