protected override void Initialize(HttpControllerContext controllerContext) { base.Initialize(controllerContext); EabcMobileAppContext context = new EabcMobileAppContext(); DomainManager = new EntityDomainManager <TodoItem>(context, Request); }
// GET api/values public string Get() { MobileAppSettingsDictionary settings = this.Configuration.GetMobileAppSettingsProvider().GetMobileAppSettings(); ITraceWriter traceWriter = this.Configuration.Services.GetTraceWriter(); string host = settings.HostName ?? "localhost"; string greeting = "Hello from " + host; EabcMobileAppContext context = new EabcMobileAppContext(); try { var item = context.PrayerRequestModels.FirstOrDefault(); if (item != null) { greeting = item.Request; } } catch (Exception e) { greeting = e.ToString(); } traceWriter.Info(greeting); return(greeting); }