public ImageModel AddTag(TagModel tag) { AnzuCore.AddTag(Id, tag.Id); return(this); }
public IndexModule() { Get("/", _ => View["index.html", new { search = "" }]); Get("/s/{query}", p => View["index", new { search = p.query }]); Get("/search/{query}", args => Response.AsJson(AnzuCore.Search((string)args.query))); }
/*public List<TagModel> Tags * { * get * { * if (_tags == null) * return _tags = AnzuCore.GetTags(Id); * else * return _tags; * } * } * * private List<TagModel> _tags;*/ public ImageModel AddTag(Guid tagID) { AnzuCore.AddTag(Id, tagID); return(this); }