AuditLog Map(tblAuditLog tblLog) { AuditLog log = new AuditLog(); log.Id = tblLog.Id; log.DistributorCostCenterId = tblLog.DistributorCostCenterId; log.DateCreated = tblLog.DateCreated; log.Type = tblLog.Type; log.Direction = tblLog.Direction; log.Description = tblLog.Description; return log; }
public Guid Save(AuditLog entity) { tblAuditLog toSave = new tblAuditLog(); toSave.Id = entity.Id; toSave.DistributorCostCenterId = entity.DistributorCostCenterId; toSave.DateCreated = entity.DateCreated; toSave.Type = entity.Type; toSave.Direction = entity.Direction; toSave.Description = entity.Description; _ctx.tblAuditLog.Add(toSave); _ctx.SaveChanges(); return toSave.Id; return Guid.Empty; }