Ejemplo n.º 1
0
    public bool Save(string chaptId, string content, string chapName)
    {
        var cv = DocoManager.GetAllChapterVersion().Where(x => x.Id.Equals(chaptId)).First <ChapterVersion>();

        if (chapName != cv.Name)
        {
            cv.Name = chapName;
            DocoManager.UpdateChapterVersion(cv);
        }
        var draft = new Draft();

        draft.VersionId = chaptId;
        draft.Content   = content;
        draft.SaveDate  = DateTime.Now;
        DocoManager.UpsertDraft(draft);

        return(true);
    }