![]() |
Değeri oldugu halde Null |
Post Reply ![]() |
|
Author | |
claymarrow ![]() Newbie ![]() Joined: 03 Mart 2021 Status: Offline Points: 2 |
![]() ![]() ![]() ![]() ![]() Posted: 03 Mart 2021 at 18:31 |
Arkadaşlar iyi akşamlar. Öncelikle ilk defa bir forumda topic açtım eğer yanlış birşey yaptıysam kusura bakmayın.Üzerinde uğraştığım projemde veritabanından "StudentId" ile çağırıp güncellemek istediğim stajyerin bilgilerini güncelleyemiyorum çünkü "StudentId" null geliyor. Halbuki 2 adet stajyer kaydı var ve birisinin StudentId=1 iken diğerininkisi 2. Yardımcı olabilir misiniz?. Kodum şu şekilde:
public ActionResult Guncelle(TblInterns c1) { var deger2 = db.TblInterns.Find(c1.StudentId); deger2.StudentNo = c1.StudentNo; deger2.Name = c1.Name; deger2.Surname = c1.Surname; deger2.Tckn = c1.Tckn; deger2.Birthdate = c1.Birthdate; deger2.Email = c1.Email; deger2.Phone = c1.Phone; deger2.Address = c1.Address; deger2.StartDate = c1.StartDate; deger2.FinishDate = c1.FinishDate; db.SaveChanges(); return RedirectToAction("StajyerList"); } |
|
![]() |
Post Reply ![]() |
|
Tweet
|
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |