示例#1
0
 partial void DeletePosition(Position instance);
示例#2
0
 partial void InsertPosition(Position instance);
示例#3
0
 partial void UpdatePosition(Position instance);
示例#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;
     }
 }