Could not resolve the entity from value binding '{!pizza_name}'. can only be used with SObjects, or objects that are Visualforce field component resolvable.
apex class
public class pizza_menu {
public string pizza_name{get;set;}
public integer price{get;set;}
public void addmenu()
{
try
{
menu__c m=new menu__c();
m.name=pizza_name;
m.price__c=price;
insert m;
}
catch (DmlException e) {
System.debug('A DML exception has occurred: ' +e.getMessage());
}
}
}
vf page
<apex:page sidebar="false" controller="pizza_menu">
<apex:pageBlock title="add the pizza" >
<apex:pageBlockSection columns="2">
<apex:form>
Name of pizza= <apex:inputfield value="{!pizza_name}"/>
Price= <apex:inputfield value="{!price}"/>
</apex:form>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:page>