Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
using System.Linq;
using System.Collections.Generic;
using ServiceStack;
using ServiceStack.Script;
namespace SharpScript
public class NavLinksPartial : SharpCodePage
string render(string PathInfo, Dictionary<string, object> links) => $@"
{links.Map(entry => $@"<li class='{GetClass(PathInfo, entry.Key)}'>
<a href='{entry.Key}'>{entry.Value}</a>
string GetClass(string pathInfo, string url) => url == pathInfo ? "active" : "";
public class CustomerCardPartial : SharpCodePage
public ICustomers Customers { get; set; }
string render(string customerId) => renderCustomer(Customers.GetCustomer(customerId));
string renderCustomer(Customer customer) => $@"
<table class='table table-bordered'>
<thead class='thead-inverse'>
{customer.City}, {customer.PostalCode}, {customer.Country}