public void Execute(ICISRequest icisRequest) { var repo = Uow.GetRepository <ICISRequest>(); repo.Update(icisRequest); Uow.SaveChanges(); }
private ICISRequest CreateIcis(RfIcis oldIcis, int requestId) { try { var icisId = GetObjectId <DicICIS>(oldIcis.TypeId); if (icisId == null || icisId == 0) { return(null); } var icis = new ICISRequest { DateCreate = new DateTimeOffset(oldIcis.DateCreate.GetValueOrDefault(DateTime.Now)), DateUpdate = DateTimeOffset.Now, ExternalId = oldIcis.Id, IcisId = icisId.Value, RequestId = requestId, Timestamp = BitConverter.GetBytes(DateTime.Now.Ticks) }; return(icis); } catch (Exception) { return(null); } }
public int Execute(ICISRequest icisRequest) { var repo = Uow.GetRepository <ICISRequest>(); repo.Create(icisRequest); Uow.SaveChanges(); return(icisRequest.Id); }