public void Remove(int Id)
        {
            string query  = $"DELETE FROM ActivityTypes WHERE Id=@id";
            var    dbArgs = new DynamicParameters();

            dbArgs.Add("id", Id);
            queryExecuter.Execute(query, dbArgs);
        }
Пример #2
0
        public void Update(Activity entity)
        {
            string query = $"UPDATE Activities SET Name=@name, TypeId=@typeId WHERE Id=@id";

            var dbArgs = new DynamicParameters();

            dbArgs.Add("id", entity.Id);
            dbArgs.Add("name", entity.Name);
            dbArgs.Add("typeId", entity.TypeId);

            queryExecuter.Execute(query, dbArgs);
        }
Пример #3
0
        public void Update(User entity)
        {
            string query = $"UPDATE Users SET Name=@name, Email=@email WHERE Id=@id";

            var dbArgs = new DynamicParameters();

            dbArgs.Add("id", entity.Id);
            dbArgs.Add("name", entity.Name);
            dbArgs.Add("email", entity.Email);

            queryExecuter.Execute(query, dbArgs);
        }
        public void Update(TimeReport entity)
        {
            string query = $"UPDATE TimeReports SET Date=@date, Duration=@duration, ActivityId=@activityId WHERE Id=@id";

            var dbArgs = new DynamicParameters();

            dbArgs.Add("id", entity.Id);
            dbArgs.Add("date", entity.Date);
            dbArgs.Add("duration", entity.Duration);
            dbArgs.Add("activityId", entity.ActivityId);

            queryExecuter.Execute(query, dbArgs);
        }