SourceSave() public static method

public static SourceSave ( Source source ) : Source
source Source
return Source
        public static Source SourceAdd(int sourceId, SourceType sourceType, string name)
        {
            var source = SourceRepository.SourceNew(sourceId, sourceType, name);

            source = SourceRepository.SourceSave(source);

            return(source);
        }
        public static Source SourceUpdate(int sourceId, SourceType sourceType, string name)
        {
            Source source;

            try
            {
                source = SourceRepository.SourceFetch(sourceId, sourceType);

                source.Name = name;

                source = SourceRepository.SourceSave(source);
            }
            catch
            {
                source = SourceRepository.SourceAdd(sourceId, sourceType, name);
            }

            return(source);
        }