Ejemplo n.º 1
0
 public static JsonApiTagResource Create(ForumTag tag)
 {
     return(new JsonApiTagResource
     {
         Attributes = new JsonApiTagAttributes
         {
             Name = tag.Name
         },
         Id = tag.Id.ToString(),
     });
 }
Ejemplo n.º 2
0
        public ForumTag CreateDatabaseModel()
        {
            var tag = new ForumTag
            {
                Description = this.Attributes.Description,
                Name        = this.Attributes.Name
            };

            if (this.Id != null)
            {
                tag.Id = ObjectId.Parse(this.Id);
            }

            return(tag);
        }