public IHttpActionResult Get(Guid id) { if (!_activityService.Exists(id)) { return(NotFound()); } using (var uow = _uowFactory.Create()) { return(Ok(Mapper.Map <ActivityDTO>(_activityService.GetById(uow, id)))); } }
public bool Exists(Guid id) { return(_activity.Exists(id)); }
public static string Summarize(this IActivity a) => a.Exists() ? $"{a.Type.ToTypeString()} {a.Name}" : null;