(#34) Update data in database | mvc tutorial for beginners in .net c#

preview_player
Показать описание
Follow us on:👇
Рекомендации по теме
Комментарии
Автор

Nitin you did great job, It was amazing session, I completely appreciate for it.

premsharanverma
Автор

Thank you so much sir. You are the best teacher.

VIKASSHARMA-lecj
Автор

We can understand your session properly...Thanks for the playlist

itsnewsgalaxy
Автор

Sir, you are doing great job. Keep it up

YogaWithLaura
Автор

hello sir, muje details or edit vale part me non nulbale vali error aa rahi hai.. "System.ArgumentException: The parameters dictionary contains a null entry for parameter 'id' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult Edit(Int32)' in An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter."
Parameter name: parameters

akilvhora
Автор

Hello sir, I have changed ID as nullable while getting the data but now I am facing the issue with updating data because of that nullable type please suggest


public ActionResult Edit(EmployeeModel model)
{
if (ModelState.IsValid)
{
repositoty.UpdateEmployee(model.Id, model);
// here is the error in model id
return
}

arttasticreelalert
Автор

hello
when i open a tab of edit it does not send request to server

aliqazi
Автор

i am getting this error "A namespace cannot directly contain members such as fields or methods” and "EmployeeRepos Does not contain a definition for and no extension method accepting a first argument of type could be found" errors please help.

vikasmaven
Автор

How to add validation for duplicate data?

vikashkhatri
Автор

On generating the view through controller using model, I am not getting the css and fonts. The view that is generated is having distorted appearance, although I am doing exactly the same thing as shown by you. Can u or anyone help what I am missing?

rohinishjaiswal
Автор

hello, can i ask a question,
how can i give route to link in view page with id? I keep id in controller but i could not call this id to view page.
<a
<i Members
</a>
I want to update members page but I want to call this action' id to different view page

fundasarikaya
Автор

Thanks for such brief explanation. I tried and it works fine, but I faced a logical problem. if I did not add any address to an employee record, then there is no record in address table. while displaying i am using address table fields too. But while updating a record without having any address, it gives error as no id is received from address table to update being null.

chandmohammad
Автор

The current request is ambiguous between the following action methods:
System.Web.Mvc.ActionResult GetEmp(Int32) on type
System.Web.Mvc.ActionResult Edit(Int32) on type

what is the solution of this error.


[Route("{GetEmp}/{id:int}")]
public ActionResult GetEmp(int id)
{
var result =
return View("GetEmp", result);

}

[Route("{Edit}/{id:int}")]
public ActionResult Edit(int id)
{
var result =
return View( result);

}

Faisal-wwoj
Автор

Hi sir
How we can update the address.?

rizwanullahhaidari
Автор

Update is working for fields in Employee table not on Address Table

techtanzeel
Автор

would you like to tell me how to update the ADDRESS Table?

jazimjamshaid
Автор

thanks sir but please also update address

adilibrar
Автор

bhai mara error aray ha etityframework ka

sabirali-hvtd
Автор

Sir inline edit karnaa btaiyega please

shivamdixit