public bool NonTransactionData(string username, string trsnsacction, string latitude, string longitude)
        {
            var spatial = new SpatialNonTransactionScheme()
            {
                Id          = new ReferenceGenerator().NGeneratedId(12).Replace("-", ""),
                Agent       = username,
                Partition   = "NonTransactional",
                Transaction = trsnsacction,
                Latitude    = latitude.Trim(),
                Longitude   = longitude.Trim(),
                CreatedOn   = DateTime.Now
            };

            return(_spatial.Add(spatial));
        }
Exemplo n.º 2
0
        public bool Add(SpatialNonTransactionScheme entity)
        {
            var agentwalletinformation = _ctx.AgentCurrentWalletStatus.SingleOrDefault(s => s.Email.Equals(entity.Agent.ToLower()));


            var state = false;

            if (agentwalletinformation != null)
            {
                entity.Agent = agentwalletinformation.Id;
                try
                {
                    _ctx.SpatialNonTransactional.Add(entity);
                    _ctx.SaveChanges();
                    state = true;
                }
                catch (Exception ex)
                {
                    state = false;
                }
            }

            return(state);
        }