This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Heaventure.Data; | |
using System.Web.Mvc; | |
namespace Heaventure.Controllers | |
{ | |
public class HomeController : Controller | |
{ | |
public ActionResult Index() | |
{ | |
var model = Constellation.All(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
namespace Heaventure.Data | |
{ | |
public class Constellation | |
{ | |
public int Id { get; private set; } | |
public string Name { get; private set; } | |
public string Description { get; private set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Globalization; | |
public static class TimeSpanExtensions | |
{ | |
public static string LocalizedTimeFormat( | |
this TimeSpan timeSpan, CultureInfo cultureInfo) | |
{ | |
string formattedTimeSpan = timeSpan.ToString(@"hh\:mm\:ss"); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Globalization; | |
class MainClass | |
{ | |
public static void Main (string[] args) | |
{ | |
var dateTime1 = new DateTime(1970, 1, 1, 0, 0, 0); | |
var dateTime2 = new DateTime(2020, 4, 1, 13, 30, 22, 500); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
class MainClass | |
{ | |
public static void Main (string[] args) | |
{ | |
var dateTime1 = new DateTime(1970, 1, 1, 0, 0, 0); | |
var dateTime2 = new DateTime(2020, 4, 1, 13, 30, 22, 500); | |
TimeSpan span = dateTime2 - dateTime1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Globalization; | |
using System.Threading; | |
using System.Web.Mvc; | |
namespace I18nDemo.Controllers | |
{ | |
public class BaseController : Controller | |
{ | |
protected override void OnActionExecuting( | |
ActionExecutingContext filterContext) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Web.Mvc; | |
using System.Web.Routing; | |
namespace I18nDemo | |
{ | |
public class RouteConfig | |
{ | |
public static void RegisterRoutes(RouteCollection routes) | |
{ | |
routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Web.Mvc; | |
namespace I18nDemo.Controllers | |
{ | |
public class HomeController : BaseController | |
{ | |
public ActionResult Index() | |
{ | |
return View(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Globalization; | |
using System.Threading; | |
using System.Web.Mvc; | |
namespace I18nDemo.Controllers | |
{ | |
public class BaseController : Controller | |
{ | |
protected override void OnActionExecuting( | |
ActionExecutingContext filterContext) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Globalization; | |
using System.Threading; | |
using System.Web.Mvc; | |
namespace I18nDemo.Controllers | |
{ | |
public class HomeController : Controller | |
{ | |
public ActionResult Index() | |
{ |