Epiworx.Business.SourceRepository.SourceInsert C# (CSharp) Method

SourceInsert() private static method

private static SourceInsert ( Source source ) : Source
source Source
return Source
        private static Source SourceInsert(Source source)
        {
            source = source.Save();

            return source;
        }

Usage Example

        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);
        }