Exemplo n.º 1
0
        public int addStore(StoreViewModel c)
        {
            Store model = new Store()
            {
                StoreName = c.StoreName,
                City      = c.City,
                Date      = c.Date,
                Ref_No    = util.GenerateStoreRef(c.City),
                Lat       = c.Lat,
                Lng       = c.Lng,
                SupportNo = c.SupportNo,
                Address   = c.CompleteAddress
            };

            context.Stores.Add(model);
            context.SaveChanges();
            return(model.store_id);
        }