Пример #1
0
 public bool AddUserDlc(Library.UserDlc userdlc)
 {
     try
     {
         var udlc = Mapper.Map(userdlc);
         _db.Add(udlc);
         _db.SaveChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Пример #2
0
 public static DataAccess.UserDlc Map(Library.UserDlc userdlc) => new DataAccess.UserDlc
 {
     UserNameNavigation = Mapper.Map(userdlc.User),
     Dlc = Mapper.Map(userdlc.Dlc)
 };