Exemple #1
0
        public async Task <Guid> Insert(string id, string VartotojoId)
        {
            var insertQuery = string.Format(_insertQueryString, id, VartotojoId);

            await _sqlClient.ExecuteNonQuery(insertQuery);

            return(new Guid());
        }
        public async Task <Guid> Insert(string id, string PratimoId, int Priejimas, int Skaicius)
        {
            var insertQuery = string.Format(_insertQueryString, id, PratimoId, Priejimas, Skaicius);

            await _sqlClient.ExecuteNonQuery(insertQuery);

            return(new Guid());
        }
        public async Task <Guid> Insert(string Pavadinimas)
        {
            var id          = Guid.NewGuid();
            var insertQuery = string.Format(_insertQueryString, id, Pavadinimas);

            await _sqlClient.ExecuteNonQuery(insertQuery);

            return(id);
        }
Exemple #4
0
        public async Task <Guid> Insert(string Id, string TrenerioID)
        {
            var id          = Guid.NewGuid();
            var insertQuery = string.Format(_insertQueryString, id, Id, TrenerioID);

            await _sqlClient.ExecuteNonQuery(insertQuery);

            return(id);
        }
Exemple #5
0
        public async Task <Guid> Insert(Guid Id)
        {
            var id           = Guid.NewGuid();
            var SukurimoData = DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss");
            var insertQuery  = string.Format(_insertQueryString, id, Id.ToString(), SukurimoData);

            await _sqlClient.ExecuteNonQuery(insertQuery);

            return(id);
        }
Exemple #6
0
        public async Task <Guid> Insert(IEnumerable <string> Pavadinimas)
        {
            var id = Guid.NewGuid();

            foreach (var a in Pavadinimas)
            {
                var insertQuery = string.Format(_insertQueryString, id, a);

                await _sqlClient.ExecuteNonQuery(insertQuery);
            }

            return(id);
        }
        public async Task <Guid> Insert(Guid TreniruotesId, Guid StatistikosId, Guid AtpazyntoPratymoId, int Priejimas, int Skaicius)
        {
            var id          = Guid.NewGuid();
            var insertQuery = string.Format(_insertQueryString, TreniruotesId, StatistikosId, AtpazyntoPratymoId, Priejimas, Skaicius);

            await _sqlClient.ExecuteNonQuery(insertQuery);

            return(id);
        }
        public void Save(string activity)
        {
            if (string.IsNullOrEmpty(activity))
            {
                throw new Exception("Can't save null or empty activity");
            }
            if (string.IsNullOrEmpty(_config.ActivityDbConnectionString))
            {
                throw new Exception("Invalid connection string passed");
            }

            var cmdText = $"exec sp_SaveActivity '{activity}'";

            _sqlClient.ExecuteNonQuery(_config.ActivityDbConnectionString, cmdText);
        }
        public async Task Delete(Guid id)
        {
            var deleteQuery = string.Format(_deleteQueryString, id.ToString());

            await _sqlClient.ExecuteNonQuery(deleteQuery);
        }