Example #1
0
        public ActionResult Add(AddDocumentInput input)
        {
            IWikiDocumentAppService service = this.CreateService <IWikiDocumentAppService>();
            string id = service.Add(input);

            return(this.SuccessData(id));
        }
Example #2
0
        public string Add(AddDocumentInput input)
        {
            input.Validate();

            WikiDocumentDetail detail = AceMapper.Map<WikiDocumentDetail>(input);
            detail.Id = IdHelper.CreateSnowflakeId().ToString();
            detail.IsDeleted = false;
            detail.CreationTime = DateTime.Now;

            this.DbContext.Insert(detail);

            return detail.Id;
        }
Example #3
0
        public string Add(AddDocumentInput input)
        {
            input.Validate();

            WikiDocumentDetail detail = new WikiDocumentDetail();

            detail.Id = IdHelper.CreateSnowflakeId().ToString();

            detail.Title   = input.Title;
            detail.Summary = input.Summary;
            detail.Tag     = input.Tag;

            detail.IsDeleted    = false;
            detail.CreationTime = DateTime.Now;

            detail.HtmlContent  = input.HtmlContent;
            detail.MarkdownCode = input.MarkdownCode;

            this.DbContext.Insert(detail);

            return(detail.Id);
        }
Example #4
0
        //[System.Web.Mvc.ValidateInput(false)]
        public ActionResult Add(AddDocumentInput input)
        {
            string id = this.Service.Add(input);

            return(this.SuccessData(id));
        }