Advertisement
Guest User

Untitled

a guest
Oct 10th, 2015
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.02 KB | None | 0 0
  1.  
  2. //KORT
  3. partimInfo.Partim = _partimRepository
  4.                             .Table
  5.                             .FirstOrDefault(m => m.Code == partimInformation.Partim.Id)
  6.                             ?? new Partim
  7.                             {
  8.                                 Code = partimInformation.Partim.Id,
  9.                                 Name = partimInformation.Partim.Naam
  10.                             }
  11.  
  12.  
  13. //LANG
  14. if (_partimRepository.Table.Any(p => p.Code == partimInformation.Partim.Id))
  15.                     {
  16.                         partimInfo.Partim = _partimRepository
  17.                             .Table
  18.                             .First(m => m.Code == partimInformation.Partim.Id);
  19.                     }
  20.                     else
  21.                     {
  22.                         partimInfo.Partim = new Partim
  23.                         {
  24.                             Code = partimInformation.Partim.Id,
  25.                             Name = partimInformation.Partim.Naam
  26.                         };
  27.                     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement