public ActiveRespone GetLastActive() { var data = repoOnSite.GetLastActive(); var result = new ActiveRespone { ActiveDateTime = data.ActiveFromDateTime, ActiveThruTime = data.ActiveThruDateTime, IsActive = DateTime.Now <= data.ActiveThruDateTime }; return(result); }