public void Save(Models.Form.Edit edit) { var entity = this.Find(edit.ID); if (entity == null) { entity = AutoMapper.Mapper.Map <Entities.Form>(edit); } else { AutoMapper.Mapper.Map(edit, entity); } entity.Fields = this.ParseHtml(edit.Html); this.Collection.ReplaceOne(m => m.ID == edit.ID, entity, UpdateOptions); }
public IActionResult Save([FromBody] Models.Form.Edit edit) { this.Manager.FormManager.Save(edit); return(this.Ok()); }