Beispiel #1
0
 partial void DeletePosition(Position instance);
Beispiel #2
0
 partial void InsertPosition(Position instance);
Beispiel #3
0
 partial void UpdatePosition(Position instance);
Beispiel #4
0
 private static Position InsertPositionByName(NPGGFFLDataContext context, string positionName)
 {
     var positionExists = context.Positions.Where(p => p.Name.ToUpper().Equals(positionName.ToUpper())).FirstOrDefault();
     if (positionExists == null)
     {
         Position position = new Position();
         position.Name = positionName;
         context.Positions.InsertOnSubmit(position);
         context.SubmitChanges();
         return context.Positions.Where(p => p.Name.ToUpper().Equals(positionName.ToUpper())).FirstOrDefault();
     }
     else
     {
         return positionExists;
     }
 }