Epiworx.Business.FeedSource.NewFeedSource C# (CSharp) Method

NewFeedSource() static private method

static private NewFeedSource ( FeedSourceMemberDataCriteria criteria ) : FeedSource
criteria FeedSourceMemberDataCriteria
return FeedSource
        internal static FeedSource NewFeedSource(FeedSourceMemberDataCriteria criteria)
        {
            return Csla.DataPortal.CreateChild<FeedSource>(criteria);
        }

Same methods

FeedSource::NewFeedSource ( int sourceId, SourceType sourceTypeId ) : FeedSource

Usage Example

        public FeedSource Add(SourceType sourceType, int sourceId)
        {
            if (this.Contains(sourceType, sourceId))
            {
                throw new ArgumentException("Source already belongs to the collection.");
            }

            var child = FeedSource.NewFeedSource(
                new FeedSourceMemberDataCriteria
            {
                SourceId     = sourceId,
                SourceTypeId = (int)sourceType
            });

            this.Add(child);

            return(child);
        }