using System.Collections.Generic;
public static void Main()
Console.WriteLine("Hello World");
public Guid ActionId { get;set;}
public Guid OwnerId { get; set; }
public virtual Contact Owner { get; set; }
public string Title { get;set; }
static class ContextFactory {
public static DataContext NewReadonlyDataContext() => null;
public string Name { get;set;}
public Guid ContactId { get;}
DataContext DataContext { get; }
public string GetOwnerName(Guid actionId)
using(var dc = ContextFactory.NewReadonlyDataContext())
action = dc.Actions.First(x => x.ActionId == actionId);
return action.Owner.Name;
public void WriteActionsFor(Contact owner)
var actions = DataContext.Actions.Where(x => x.OwnerId == owner.ContactId)
foreach(var a in actions)
public void WriteActionData(Action a)
public static class Response {
public static void Write(string x){}
DataContext DataContext { get; }
public void WriteActionsFor(Contact owner)
var actions = DataContext.Actions.Where(x => x.OwnerId == owner.ContactId)
foreach(var a in actions)
public void WriteActionData(string aTitle)
class DataContext : IDisposable {
public IQueryable<Action> Actions { get; }