private void AddDefaultExtracts(DatabaseProtocol protocol) { var extracts = DefaultExtracts(); var emrName = _emrSystemRepository.Get(protocol.EmrSystemId).Name; foreach (var extract in extracts) { extract.EmrSystemId = protocol.EmrSystemId; extract.DatabaseProtocolId = protocol.Id; extract.Emr = emrName; _extractRepository.CreateOrUpdate(extract); _extractRepository.SaveChanges(); } }
public void Save(Extract extract) { _extractRepository.CreateOrUpdate(extract); _extractRepository.SaveChanges(); }