/// <summary> /// Deprecated Method for adding a new object to the aspnet_Users EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToaspnet_Users(aspnet_Users aspnet_Users) { base.AddObject("aspnet_Users", aspnet_Users); }
private void SetOffersPosition(IEnumerable<vw_BidderOffers> offers,aspnet_Users bidder) { foreach (vw_BidderOffers o in offers) { bool bidDirection = inBidDB.Auctions.Where(x => x.AuctionId == o.AuctionId).FirstOrDefault().Direction; //bool bidDirection = if (bidDirection) { var offersInAuction = inBidDB.Offers.Where(x => x.AuctionId == o.AuctionId).OrderBy(x => x.CurrentPrice); int position = 0; foreach (Offer of in offersInAuction) { position += 1; if (of.UserId == bidder.UserId) { o.StartPrice = position; break; } } } else { var offersInAuction = inBidDB.Offers.Where(x => x.AuctionId == o.AuctionId).OrderByDescending(x => x.CurrentPrice); int position = 0; foreach (Offer of in offersInAuction) { position += 1; if (of.UserId == bidder.UserId) { o.StartPrice = position; break; } } } } }
/// <summary> /// Create a new aspnet_Users object. /// </summary> /// <param name="applicationId">Initial value of the ApplicationId property.</param> /// <param name="userId">Initial value of the UserId property.</param> /// <param name="userName">Initial value of the UserName property.</param> /// <param name="loweredUserName">Initial value of the LoweredUserName property.</param> /// <param name="isAnonymous">Initial value of the IsAnonymous property.</param> /// <param name="lastActivityDate">Initial value of the LastActivityDate property.</param> public static aspnet_Users Createaspnet_Users(global::System.Guid applicationId, global::System.Guid userId, global::System.String userName, global::System.String loweredUserName, global::System.Boolean isAnonymous, global::System.DateTime lastActivityDate) { aspnet_Users aspnet_Users = new aspnet_Users(); aspnet_Users.ApplicationId = applicationId; aspnet_Users.UserId = userId; aspnet_Users.UserName = userName; aspnet_Users.LoweredUserName = loweredUserName; aspnet_Users.IsAnonymous = isAnonymous; aspnet_Users.LastActivityDate = lastActivityDate; return aspnet_Users; }