//*** Tags ///<exception cref="SystemException"></exception> public async Task AddTag(BlogArticleTag inTag) { await Task.Run( () => { _blogDBContext.BlogArticlesTags.Add(inTag); _blogDBContext.SaveChanges(); }); }
public async Task <IHttpActionResult> DeleteTag(BlogArticleTag inTag) { try { await _blogService.DeleteTag(inTag); return(Ok()); } catch (SystemException error) { return(BadRequest(error.Message)); } }
///<exception cref=SystemException"></exception> public async Task DeleteTag(BlogArticleTag inTag) { await Task.Run( () => { _blogDBContext. BlogArticlesTags. Remove(_blogDBContext. BlogArticlesTags. Attach(inTag)); _blogDBContext.SaveChanges(); }); }