Click here to Skip to main content
15,880,891 members
Please Sign up or sign in to vote.
1.60/5 (2 votes)
See more: , +
I my program i have to Insert the Company details to Data base ,and i have stored proc to insert and update .I have mentioned Type parameter I and U (i.e insert and update) in my stored proc. Based on the type passed from front end operation should perform . I have connected Db through Entity framework

C#
private PTMEntities1 db = new PTMEntities1();


And my post method

C#
 [HttpPost]
    public ActionResult Company(Company comp)
    {
        Guid companyId = new Guid();
        comp.CompanyId = companyId;

        Guid createdBy =new Guid( "6B2FA75B-8A7F-4CF2-BBF7-9C5728308E0C");
        comp.CreatedBy = createdBy;

        db.Companies.Add(comp);
        db.SaveChanges();
        return View(comp);
    }
}


I have to pass type here .

Am getting error Error 1 Error 2037: A mapping function bindings specifies a function PTMModel.Store.Company_Insert_Update but does not map the following function parameters: Type. D:\Checked pro's\ATSSample\ATSSample\Models\Model1.edmx 1259 17 ATSSample

Am not getting how to pass parameter to stored proc which i connected through Entity Framework in MVC4 .

Please look through this .suggest me any idea .

Thanks in advance ...
Posted
Updated 15-Dec-13 20:39pm
v5
Comments
Maciej Los 16-Dec-13 2:31am    
Do not repost the same question 3 times![^]
OriginalGriff 16-Dec-13 2:40am    
Not a repost, this is the original. I have delete the later pair as they contained less information!
Maciej Los 16-Dec-13 2:41am    
OKThank you, Paul ;)
karthik mushyam 16-Dec-13 2:52am    
Plz help me

1 solution

Hi Karthik,

You can refer here[^] to Connect/map store proc to your mvc application.
Hope this helps you a bit.

Regards,
RK
 
Share this answer
 
Comments
karthik mushyam 16-Dec-13 3:46am    
In mapping details for Type :char parameter am not getting any property of type

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900