/** Add new entry to ArchivedGifts table */ private BLLAppDTO.ArchivedGiftResponseBLL?AddArchivedGift(Guid giftId, Guid userId, Guid receiverId) { // Create var archivedGiftBLL = new BLLAppDTO.ArchivedGiftFullBLL { StatusId = new Guid(_archivedId), ActionTypeId = new Guid(_activeId), GiftId = giftId, UserGiverId = userId, UserReceiverId = receiverId, DateArchived = DateTime.UtcNow, IsConfirmed = false }; // Add var newArchivedGift = UOW.ArchivedGifts.Add(Mapper.MapArchivedGiftFullToDAL(archivedGiftBLL), userId); // Track UOW.AddToEntityTracker(newArchivedGift, archivedGiftBLL); // Check added data var isArchivalSuccessful = archivedGiftBLL.GiftId == giftId; return(newArchivedGift != null && isArchivalSuccessful?Mapper.MapArchivedGiftFullToResponse(archivedGiftBLL) : null); }
public BLLAppDTO.ArchivedGiftResponseBLL MapArchivedGiftFullToResponse(BLLAppDTO.ArchivedGiftFullBLL inObject) // TODO: Fix { return(Mapper.Map <BLLAppDTO.ArchivedGiftResponseBLL>(inObject)); }
public DALAppDTO.ArchivedGiftDAL MapArchivedGiftFullToDAL(BLLAppDTO.ArchivedGiftFullBLL inObject) { return(Mapper.Map <DALAppDTO.ArchivedGiftDAL>(inObject)); }