public void Update(long Id, TagDTO tagDTO) { tblTag tagTbl = _dbcontext.tblTags.SingleOrDefault(t => t.ID == Id); if (tagTbl != null) { TagDTO.ConvertDTOtoTable(tagDTO, ref tagTbl); } else { throw new TagException(Resources.TagNullException); } }
/// <summary> /// This method for insertion of Tags into DB. After Calling this function must call the "Save()" /// </summary> /// <param name="tagDTO"></param> public void Insert(TagDTO tagDTO) { _dbcontext.tblTags.Add(TagDTO.ConvertDTOtoTable(tagDTO)); }