public HttpResponseMessage AddItem(Product item) { // TODO: validate input same items try { _dataProvider.AddItem(item); return(new HttpResponseMessage(HttpStatusCode.OK)); } catch (Exception ex) { return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message)); } }
public EntityInfo AddItem(EntityInfo objEntity, int tabId) { DotNetNuke.Common.Requires.PropertyNotNegative("portalID", "", objEntity.PortalId); objEntity.Id = _dataProvider.AddItem(objEntity.PortalId); if (objEntity.ContentItemId < 1) { objEntity.ContentItemId = CompleteItemCreation(objEntity, tabId); } //// handle cache clearing //DataCache.RemoveCache(Constants.ModuleCacheKey + Constants.ItemCacheKey + objEntity.ModuleID); return(objEntity); }