public Entities.BaseEntity Adicionar(Entities.BaseEntity entity) { this.Promocoes.Add(entity); HttpContext.Current.Session["PromocoesBD"] = this.Promocoes; return(entity); }
/// <summary> /// Creates a new instance of a <typeparamref name="BaseModel"/> object, and initializes it with the specified entity. /// </summary> /// <param name="entity"></param> public BaseModel(Entities.BaseEntity entity) { this.AddedById = entity.AddedById; this.AddedOn = entity.AddedOn; this.UpdatedById = entity.UpdatedById; this.UpdatedOn = entity.UpdatedOn; this.RowVersion = Encoding.UTF8.GetString(entity.RowVersion); }
public bool SaveStore(Entities.BaseEntity store) { SaveRequest inValue = new SaveRequest(); inValue.store = store; SaveResponse retVal = ((BerskaClient.BerskaService.IStoreService)(this)).SaveStore(inValue); return(retVal.Result); }
public Entities.BaseEntity Adicionar(Entities.BaseEntity entity) { if (entity.ID == 0) { entity.ID = 1; } else { entity.ID = this.Buscar().Max(m => m.ID) + 1; } this.Cardapios.Add(entity); HttpContext.Current.Session["CardapiosBD"] = this.Cardapios; return(entity); }
public Entities.BaseEntity Adicionar(Entities.BaseEntity entity) { if (this.Lanches.Count > 0) { entity.ID = this.Lanches.Max(l => l.ID) + 1; } else { entity.ID = 1; } this.Lanches.Add(entity); HttpContext.Current.Session["LanchesBD"] = Lanches; return(entity); }
public Entities.BaseEntity Adicionar(Entities.BaseEntity entity) { if (this.Ingredientes.Count > 0) { entity.ID = this.Ingredientes.Max(i => i.ID) + 1; } else { entity.ID = 1; } Ingredientes.Add(entity); HttpContext.Current.Session["IngredientesBD"] = Ingredientes; return(entity); }
public Entities.BaseEntity Adicionar(Entities.BaseEntity entity) { if (Pedidos.Count > 0) { entity.ID = Pedidos.Max(p => p.ID) + 1; } else { entity.ID = 1; } Pedidos.Add(entity); HttpContext.Current.Session["PedidosBD"] = Pedidos; return(entity); }
public Entities.BaseEntity Atualizar(Entities.BaseEntity entity) { throw new NotImplementedException(); }