<commit_before>﻿Imports System.Data.Entity
Imports System.Data.Entity.Infrastructure
Imports System.Net
Imports System.Web.Http
Imports System.Web.Http.Description
Imports Newtonsoft.Json.Linq

Namespace Controllers
	Public Class MasterInventoryItemsController
		Inherits ApiController

		Private db As New Database

		''' <summary>returns all inventory items</summary>
		Function GetMasterInventory() As IQueryable(Of MasterInventoryItem)
			Return db.MasterInventory
		End Function

		''' <summary>
		''' returns a single MasterInventoryItem (GET: api/MasterInventoryItems/5)
		''' </summary>
		''' <param name="id">The ID of the item you want</param>
		''' <returns></returns>
		<ResponseType(GetType(MasterInventoryItem))>
		Function GetMasterInventoryItem(ByVal id As Integer) As IHttpActionResult
			Dim masterInventoryItem As MasterInventoryItem = db.MasterInventory.Find(id)
			If IsNothing(masterInventoryItem) Then
				Return NotFound()
			End If

			Return Ok(masterInventoryItem)
		End Function

		''' <summary>
		''' Updates a MasterInventoryItem (PUT: api/MasterInventoryItems/5)
		''' </summary><commit_msg>added CORS to controller<commit_after>﻿Imports System.Data.Entity
Imports System.Data.Entity.Infrastructure
Imports System.Net
Imports System.Web.Http
Imports System.Web.Http.Description
Imports Newtonsoft.Json.Linq

Namespace Controllers
''' Rex Was Here!
 [EnableCors(origins: "http://localhost:5901", headers: "*", methods: "*")]
''' But Rex Was Not Below Here! ! ! 
	Public Class MasterInventoryItemsController
		Inherits ApiController

		Private db As New Database

		''' <summary>returns all inventory items</summary>
		Function GetMasterInventory() As IQueryable(Of MasterInventoryItem)
			Return db.MasterInventory
		End Function

		''' <summary>
		''' returns a single MasterInventoryItem (GET: api/MasterInventoryItems/5)
		''' </summary>
		''' <param name="id">The ID of the item you want</param>
		''' <returns></returns>
		<ResponseType(GetType(MasterInventoryItem))>
		Function GetMasterInventoryItem(ByVal id As Integer) As IHttpActionResult
			Dim masterInventoryItem As MasterInventoryItem = db.MasterInventory.Find(id)
			If IsNothing(masterInventoryItem) Then
				Return NotFound()
			End If

			Return Ok(masterInventoryItem)
		End Function

		''' <summary>
		''' Updates a MasterInventoryItem (PUT: api/MasterInventoryItems/5)
		''' </summary>
{'fraction_non_alphanumeric': 0.10184409052808047, 'fraction_numerical': 0.003352891869237217, 'mean_word_length': 5.2650918635170605, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4627936', 'n_tokens_mistral': 761, 'n_tokens_neox': 693, 'n_words': 185}