Beispiel #1
0
 public ResourceResult Get(BandUrl url)
 {
     var vm = Mapper.Map<BandMetadata, BandViewModel>(bands.GetMetadata(new BandName {Value = url.BandName}));
     vm.Params = new PagingParams(url);
     vm.Gigs = gigs.Get(new BandName {Value = url.BandName}, new PagingParams(url));
     return OK(vm).AsHtml();
 }
Beispiel #2
0
 public ResourceResult Post(BandUrl url, BandViewModel input)
 {
     bandSave.Save(Mapper.Map<BandViewModel, BandMetadata>(input));
     return Get(new BandUrl(input.BandName));
 }