public void Delete(int widgetId, string UserId) { var itemToDelete = _widgetRep.GetSingle(x => x.ApplicationUserId == UserId && x.WidgetId == widgetId); _widgetRep.Delete(itemToDelete); _widgetRep.Save(); }
public Widget GetWidget(int id) { return(_widgetRepository.GetSingle(id)); }