public bool CreateNewTags(NewTweetDTO newtweetdto) { string[] result = newtweetdto.Message.Split(' '); List <string> tagElements = new List <string>(); foreach (string s in result) { if (s.Contains('#')) { tagElements.Add(s); } } using (TagDBContext tagDBContext = new TagDBContext()) { bool res = tagDBContext.AddTags(tagElements, newtweetdto.TweetID); return(true); } }
/// <summary> /// Constructor, initializes DB context objects and automappers. /// </summary> public TweetBusinessContext() { tagDBContext = new TagDBContext(); tweetDBContext = new TweetDBContext(); tagBusinnessContext = new TagBusinessContext(); }