public IEnumerable <IPosition> GetMovements( IPosition pos, int minX = int.MinValue, int minY = int.MinValue, int maxX = int.MaxValue, int maxY = int.MaxValue ) => RelativePositions .Select(s => pos.Add(s)) .Where(w => w.IsInside(minX, minY, maxX, maxY));
public IActionResult Save(DepartmentViewModel model) { if (ModelState.IsValid) { var department = new Position { Id = model.Id, Description = model.Description, }; if (model.Id.ToString().Length <= 0) { _Position.Add(department); } else { _Position.Update(department); } return(RedirectToAction("Index")); } else { return(View()); } }