public void Add([FromBody] Homologation homologation) => _homologationRepository.Add(new Homologation { Code = homologation.Code, Name = homologation.Name, HomologationItems = homologation.HomologationItems, Manufacturer = homologation.Manufacturer, });
private static CheckResult WarningCheck(Homologation homologation, Standart standart, DateTime checkTime) { return(new CheckResult { ResultCode = ResultCode.ExpiresSoon, CheckTime = checkTime, Homologation = homologation, Standart = standart, InternalId = ObjectId.GenerateNewId(), SessionId = Guid.NewGuid() }); }
public async Task Add(Homologation entity) { await ExecuteAndHandleException.Execute(async() => { if (entity.InternalId == ObjectId.Empty) { entity.InternalId = ObjectId.GenerateNewId(); } await _context.Homologations.InsertOneAsync(entity); } ); }
public void Add([FromBody] Homologation homologation) => _homologationRepository.Add(new Homologation { Code = homologation.Code });