public VenueMetadata GetMetadata(VenueName venueName) { var dir = files.GetDirectory(HostingEnvironment.MapPath("~/Content/Export/Venues/Metadata")); var result = new SmartMatch<VenueMetadata>().Do(dir, venueName); return result.ExactMatchFound ? result.Results.First() : new VenueMetadata { VenueName = venueName.Value }; }
public VenueDiary Get(VenueName venueName) { var dir = files.GetDirectory(HostingEnvironment.MapPath("~/Content/Export/Venues/")); var result = new SmartMatch<VenueDiary>().Do(dir, venueName); return result.ExactMatchFound ? result.Results.First() : new EmptyVenueDiary { Venue = venueName.Value }; }