public async Task <LogBO> UpdateAsync(LogBO model) { var result = await this._commands .UpdateAsync(MapModelToEntity(model)); return(result != null?MapEntityToModel(result) : null); }
static void Main(string[] args) { var logBO = new LogBO(); var listMatches = logBO.LoadGameLog(); PrintScoreBoard(listMatches); }
public void Gravar(string _acao, string _entidade, string _usuario, string _mensagem) { LogBO _logger = new LogBO(); Log _log = new Log(_acao, _entidade, _usuario, _mensagem); _logger.SalvarLog(_log); }
public ActionResult GetLista(string Fecha) { string[] f = Fecha.Split('/'); string _f = f[2] + "-" + f[1] + "-" + f[0]; ViewBag.list = LogBO.getListLog(_f); ViewBag.Fecha = Fecha; return(View("Index")); }
private Log MapModelToEntity(LogBO model) { Log entity = new Log { Id = model.Id, Information = model.Information, Source = model.Source, DateCreated = model.DateCreated }; return(entity); }
private LogBO MapEntityToModel(Log entity) { LogBO model = new LogBO { Id = entity.Id, Information = entity.Information, DateCreated = entity.DateCreated, Source = entity.Source }; return(model); }
public async Task <ActionResult> AddAsync([FromBody] LogBO model) { _logger.LogError(model.Information); model.DateCreated = DateTime.UtcNow; var log = await _logService .AddAsync(model); if (log != null) { return(CreatedAtAction("Get", new { id = log.Id }, log)); } return(BadRequest()); }
public ModelView.StatisticsModel GetStatisticsModel(string url) { try { var model = new ModelView.StatisticsModel(); if (string.IsNullOrEmpty(url)) { return(model); } var logBo = new LogBO(); return(logBo.GetStatisticsModel(ConnectionHandler, url)); } catch (KnownException ex) { Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace); throw new KnownException(ex.Message, ex); } catch (Exception ex) { Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace); throw new KnownException(ex.Message, ex); } }
// GET: LogActividad public ActionResult Index() { ViewBag.list = LogBO.getListLog(""); ViewBag.Fecha = (DateTime.Now.ToString("dd/MM/yyyy")).Replace("-", "/"); return(View()); }
public void LogBOExists() { var logBO = new LogBO(); }
private void LogBOFactory() { _logBO = new LogBO(); }
public void LoadMatch() { var logBO = new LogBO(); logBO.LoadGameLog(); }