public void AddItem(WebAppItem item) { DataAccessService .GetQuery("insert or replace into webapp_item (url, keywords, search, profile) values (@url, @keywords, @search, @profile)") .WithParameter("url", item.Url) .WithParameter("keywords", NormalizeKeywords(item.Keywords)) .WithParameter("search", GetSearchField(item.Url, item.Keywords)) .WithParameter("profile", GetProfile(item.Profile)) .Execute(); }
public void AddWebAppItem(string url, string keywords, string profile) { var item = new WebAppItem { Url = url, Keywords = keywords, Profile = profile, }; WebAppItemRepository.AddItem(item); }