Пример #1
0
        public void UpdatePosition(Position position)
        {
            Position p = context.Positions.Find(position.Id);

            if (p != null)
            {
                context.Entry(p).State = EntityState.Modified;
                context.SaveChanges();
            }
        }
Пример #2
0
        public long InsertPosition(Position position)
        {
            context.Positions.Add(position);
            context.SaveChanges();

            return position.Id;
        }