Skip to content

Commit

Permalink
Added Created date to application model
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfowl committed Jul 30, 2011
1 parent 711b32e commit f5a3c5f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Kudu.Web/Controllers/ApplicationController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ public ApplicationController(ISiteManager siteManager) {
// GET: /Application/

public ViewResult Index() {
return View(db.Applications.ToList().Select(a => new ApplicationViewModel(a)));
var applications = db.Applications.OrderBy(a => a.Created);
return View(applications.ToList().Select(a => new ApplicationViewModel(a)));
}

//
Expand Down Expand Up @@ -64,7 +65,8 @@ public ActionResult Create(ApplicationViewModel appViewModel) {
SiteUrl = site.SiteUrl,
ServiceAppName = site.ServiceAppName,
SiteName = site.SiteName,
RepositoryType = (int)appViewModel.RepositoryType
RepositoryType = (int)appViewModel.RepositoryType,
Created = DateTime.Now
};

// Give iis a chance to start the app up
Expand Down
4 changes: 3 additions & 1 deletion Kudu.Web/Models/Application.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations;
using System;
using System.ComponentModel.DataAnnotations;

namespace Kudu.Web.Models {
public class Application {
Expand All @@ -10,5 +11,6 @@ public class Application {
public string ServiceUrl { get; set; }
public string SiteUrl { get; set; }
public int RepositoryType { get; set; }
public DateTime Created { get; set; }
}
}

0 comments on commit f5a3c5f

Please sign in to comment.