public ActionResult DeleteConfirmed(long id) { LogicalOrientationsPost logicalorientations = _logicalorientationsService.GetPost(id); logicalorientations.UserName = User.Identity.Name; _logicalorientationsService.Delete(logicalorientations); return(RedirectToAction("Index")); }
public ActionResult Edit(long id) { LogicalOrientationsPost logicalorientations = _logicalorientationsService.GetPost(id); if (logicalorientations == null) { return(NotFound()); } return(View(logicalorientations)); }
public ActionResult Edit([Bind("ixLogicalOrientation,sLogicalOrientation")] LogicalOrientationsPost logicalorientations) { if (ModelState.IsValid) { logicalorientations.UserName = User.Identity.Name; _logicalorientationsService.Edit(logicalorientations); return(RedirectToAction("Index")); } return(View(logicalorientations)); }
public Task Delete(LogicalOrientationsPost logicalorientationsPost) { // Additional validations // Pre-process // Process this._logicalorientationsRepository.RegisterDelete(logicalorientationsPost); try { this._logicalorientationsRepository.Commit(); } catch (Exception ex) { this._logicalorientationsRepository.Rollback(); // Log exception throw; } // Post-process return(Task.CompletedTask); }
public Task <Int64> Create(LogicalOrientationsPost logicalorientationsPost) { // Additional validations // Pre-process // Process this._logicalorientationsRepository.RegisterCreate(logicalorientationsPost); try { this._logicalorientationsRepository.Commit(); } catch (Exception ex) { this._logicalorientationsRepository.Rollback(); // Log exception throw; } // Post-process return(Task.FromResult(logicalorientationsPost.ixLogicalOrientation)); }
public void RegisterDelete(LogicalOrientationsPost logicalorientationsPost) { _context.LogicalOrientationsPost.Remove(logicalorientationsPost); }
public void RegisterEdit(LogicalOrientationsPost logicalorientationsPost) { _context.Entry(logicalorientationsPost).State = EntityState.Modified; }
public void RegisterCreate(LogicalOrientationsPost logicalorientationsPost) { _context.LogicalOrientationsPost.Add(logicalorientationsPost); }