public static MetaTag Delete(Guid id) { var doc = MetaTagRepository.Read(id); var resDel = ElasticClientFactory.Client .Delete <MetaTag>(doc); ElasticClientFactory.Client.Refresh("metatags"); return(doc); }
public static List <MetaTag> ReadMany(List <Guid> ids) { var list = new List <MetaTag>(); foreach (var id in ids) { list.Add(MetaTagRepository.Read(id)); } return(list); }
public static MetaTag Update(Guid id, string name, string description, string dataType) { var doc = MetaTagRepository.Read(id); doc.Name = name; doc.Description = description; doc.DataType = dataType; var response = ElasticClientFactory.Client.Index(doc); ElasticClientFactory.Client.Refresh("metatags"); return(doc); }