internal static Source FetchSource(SourceData data) { var result = new Source(); result.Fetch(data); result.MarkOld(); return result; }
public static Source SourceSave(Source source) { if (!source.IsValid) { return source; } Source result; if (source.IsNew) { result = SourceRepository.SourceInsert(source); } else { result = SourceRepository.SourceUpdate(source); } return result; }
public static bool SourceDelete(Source source) { Source.DeleteSource(source.SourceId, (SourceType)source.SourceTypeId); return true; }
private static Source SourceUpdate(Source source) { if (!source.IsDirty) { return source; } source = source.Save(); return source; }
private static Source SourceInsert(Source source) { source = source.Save(); return source; }