View main.cs
using System;
using System.Collections.Generic;
using ServiceStack;
using ServiceStack.Logging;
using ServiceStack.Text;
using ServiceStack.OrmLite;
using ServiceStack.OrmLite.Sqlite;
using ServiceStack.DataAnnotations;
LogManager.LogFactory = new ConsoleLogFactory();
View main.cs
using System;
using System.Collections.Generic;
using ServiceStack;
using ServiceStack.Logging;
using ServiceStack.Text;
using ServiceStack.OrmLite;
using ServiceStack.OrmLite.Sqlite;
using ServiceStack.DataAnnotations;
LogManager.LogFactory = new ConsoleLogFactory();
View main.cs
using System.Collections.Generic;
using ServiceStack;
using ServiceStack.Text;
public enum Color { Red, Green, Blue }
public enum OtherColor { Red, Green, Blue }
public class SubModel
{
public string Name { get; set; }
View main.cs
using System.Linq;
using ServiceStack;
using ServiceStack.Text;
using System.Drawing;
JsConfig<Rectangle>.SerializeFn = r => $"{r.X},{r.Y},{r.Width},{r.Height}";
JsConfig<Rectangle>.DeSerializeFn = s => {
var parts = s.Split(',');
return new Rectangle(
int.Parse(parts[0]),
View main.cs
using System.Linq;
using System.Collections.Generic;
using ServiceStack;
using ServiceStack.Text;
var json = @"{
""data"" : {
""20170127001500"" : [0,0,0,0],
""20170127003000"" : [0,0,0,0],
""20170127004500"" : [0,0,0,0],
View main.cs
using System.Linq;
using System.Collections.Generic;
using ServiceStack;
using ServiceStack.Text;
public class Dto
{
public int SourceID { get; set; }
public Dictionary<int, MachineEntry> Machines { get; set; }
}
View data.cs
using System.Collections.Generic;
using System.Data;
using ServiceStack;
using ServiceStack.OrmLite;
using ServiceStack.DataAnnotations;
public class Artist
{
public int Id { get; set; }
public string Name { get; set; }
View main.cs
using ServiceStack;
using ServiceStack.Logging;
using ServiceStack.Text;
using ServiceStack.OrmLite;
using ServiceStack.OrmLite.Sqlite;
using ServiceStack.DataAnnotations;
LogManager.LogFactory = new ConsoleLogFactory();
var dbFactory = new OrmLiteConnectionFactory(":memory:", SqliteDialect.Provider);
var db = dbFactory.Open(); // Open ADO.NET DB Connection
View main.cs
using ServiceStack;
using ServiceStack.Text;
var ProfileData = new { XYZ = "XYZ", DEF = "DEF"};
var clearJSON = ProfileData.ToJson();
clearJSON.Print();
View AngularJS.cshtml
@model RockstarsResponse
@{
Layout = Html.ResolveLayout("HtmlReport");
ViewBag.Title = "Rocking with AngularJS";
}
<script src="/js/angular.min.js"></script>
<script src="/js/jquip.events.css.ajax.min.js"></script>
<script type="text/javascript">