public ServiceResult Add(eSektorEntities.Task task) { task.TaskId = Guid.NewGuid(); _uow.GetRepository <eSektorEntities.Task>().Add(task); int ess = _uow.Save(); if (ess > 0) { return(new ServiceResult("Kayıt Başarılı", ResultState.Success)); } return(new ServiceResult("Bir Hata Nedeni İle Kayıt Gerçekleştirilemedi", ResultState.Error)); }
public ActionResult PostTask(eSektorEntities.Task tsk) { var user = User.Identity.Name; var member = _ms.GetMemberByUsername(user); tsk.TaskId = Guid.NewGuid(); tsk.MemberId = member.Data.MemberId;//olmzssa bu atamayı view de yap var result = _ts.Add(tsk); ViewBag.Sonuc = result.Message; ViewBag.SonucDurumu = result.State; return(View(tsk)); }