//create or add Source

        //get Source by id

        //get Source by Guid
        public static Source GetSourceApplication(Guid applicationId)
        {
            //KhartaSource khartaSource = new KhartaSource();
            try {
                InternalApi.KhartaSource source = InternalApi.SourceDataService.GetSourceApplication(applicationId);
                if (source == null)
                {
                    return(null);
                }

                return(new Source(source));
            } catch (Exception ex) {
                return(new Source(new AdditionalInfo(new Error(ex.GetType().FullName, ex.Message))));
            }
        }
        internal Source(InternalApi.KhartaSource source)
        {
            var a = source.Id;

            ApplicationId     = source.ApplicationId;
            ApplicationTypeId = source.ApplicationTypeId;
            AvatarUrl         = source.AvatarUrl;
            Description       = source.Description;
            Name       = source.Name;
            OntologyId = source.OntologyId.HasValue ? source.OntologyId.Value : 0;
            SafeName   = source.SafeName;
            Url        = source.Url;
            IsEnabled  = source.IsEnabled.HasValue ? source.IsEnabled.Value : true;
            GroupId    = source.GroupId.HasValue ? source.GroupId.Value : Apis.Get <IGroups>().Root.Id.Value;
        }
 internal Source(InternalApi.KhartaSource khartaSource) : base()
 {
     _khartaSource = khartaSource;
 }