private void MergeFireExtinguisherControl(FireExtinguisherControl originalFireExtinguisherControl, ControlRequest FireExtinguisherControl) { originalFireExtinguisherControl.Consortium = this.ConsortiumRepository.GetById(FireExtinguisherControl.ConsortiumId); originalFireExtinguisherControl.Provider = this.ProviderRepository.GetById(FireExtinguisherControl.ProviderId); originalFireExtinguisherControl.ControlDate = FireExtinguisherControl.ControlDate; originalFireExtinguisherControl.ExpirationDate = FireExtinguisherControl.ExpirationDate; }
public FireExtinguisherControl CreateFireExtinguisherControl(ControlRequest FireExtinguisherControl) { var entityToInsert = new FireExtinguisherControl() { }; MergeFireExtinguisherControl(entityToInsert, FireExtinguisherControl); FireExtinguisherControlRepository.Insert(entityToInsert); return(entityToInsert); }
public FireExtinguisherControl UpdateFireExtinguisherControl(FireExtinguisherControl originalFireExtinguisherControl, ControlRequest FireExtinguisherControl) { this.MergeFireExtinguisherControl(originalFireExtinguisherControl, FireExtinguisherControl); FireExtinguisherControlRepository.Update(originalFireExtinguisherControl); return(originalFireExtinguisherControl); }