$ git clone https://github.com/marybethhunter/SpinRecycle.git
$ cd SpinRecycle
- Vinyl Destination is an online store where a user can buy vinyl records.
- Users have a cart they can create a record entry to - adding the cart to the record.
- Users can udpate their cart by deleting or adding records to it.
- Users can see all records available for purchase.
- New records can be added to the database by going to the /addrecord path.
public List<Record> GetCartRecords()
{
using (SqlConnection conn = Connection)
{
conn.Open();
using (SqlCommand cmd = conn.CreateCommand())
{
cmd.CommandText = @"
SELECT c.RecordId as CartRecordId,
r.RecordId as RecordId,
r.Title,
r.Artist,
r.Genre,
r.Price,
r.Image
FROM Cart as c
LEFT JOIN Record as r
ON c.RecordId = r.RecordId
";
SqlDataReader reader = cmd.ExecuteReader();
List<Record> records = new List<Record>();
while (reader.Read())
{
if (reader["RecordId"] != DBNull.Value)
{
Record record = new Record
{
RecordId = reader.GetInt32(reader.GetOrdinal("RecordId")),
Title = reader.GetString(reader.GetOrdinal("Title")),
Artist = reader.GetString(reader.GetOrdinal("Artist")),
Genre = reader.GetString(reader.GetOrdinal("Genre")),
Price = reader.GetDecimal(reader.GetOrdinal("Price")),
Image = reader.GetString(reader.GetOrdinal("Image")),
};
records.Add(record);
}
}
reader.Close();
return records;
}
}
}
- Javascript
- React
- Firebase
- Postman
- Figma
- Axios
- SQL
- C#
- Reactstrap
- Styled Components
- Swagger