SourceFetch() public static method

public static SourceFetch ( int sourceId, SourceType sourceType ) : Source
sourceId int
sourceType SourceType
return Source
Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public static bool SourceDelete(int sourceId, SourceType sourceType)
 {
     return(SourceRepository.SourceDelete(
                SourceRepository.SourceFetch(sourceId, sourceType)));
 }