示例#1
0
        public static MongoWebHook ToMongo(this WebHook webHook)
        {
            MongoWebHook mongoWebHook = new MongoWebHook();

            mongoWebHook.Id          = webHook.Id;
            mongoWebHook.Version     = webHook.Version;
            mongoWebHook.CreatedAt   = webHook.CreatedAt;
            mongoWebHook.ModifiedAt  = webHook.ModifiedAt;
            mongoWebHook.Name        = webHook.Name;
            mongoWebHook.Description = webHook.Description;
            mongoWebHook.TargetUrl   = webHook.TargetUrl;
            mongoWebHook.EventName   = webHook.EventName;

            return(mongoWebHook);
        }
示例#2
0
        public static WebHook ToModel(this MongoWebHook mongoWebHook)
        {
            WebHook webHook = new WebHook();

            webHook.Id          = mongoWebHook.Id;
            webHook.Version     = mongoWebHook.Version;
            webHook.CreatedAt   = mongoWebHook.CreatedAt;
            webHook.ModifiedAt  = mongoWebHook.ModifiedAt;
            webHook.Name        = mongoWebHook.Name;
            webHook.Description = mongoWebHook.Description;
            webHook.TargetUrl   = mongoWebHook.TargetUrl;
            webHook.EventName   = mongoWebHook.EventName;

            return(webHook);
        }