This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css"> | |
| <link href="~/Content/bootstrapStars.css" rel="stylesheet" /> | |
| <div class="stars"> | |
| <form action=""> | |
| <input class="star star-5" id="star-5" type="radio" name="star"/> | |
| <label class="star star-5" for="star-5"></label> | |
| <input class="star star-4" id="star-4" type="radio" name="star"/> | |
| <label class="star star-4" for="star-4"></label> | |
| <input class="star star-3" id="star-3" type="radio" name="star"/> | |
| <label class="star star-3" for="star-3"></label> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| INSERT INTO | |
| GOOD0001 (STOREID, GOODUC, DOCUMENTTYPE, DOCUMENTID, DOCUMENTITEM, GOODID, STATE, INVOICEID, | |
| INVOICEITEM, TOTAL, GOODSTATE, PRICE, FITDATE_MIN, FITDATE_MAX, INVOICEDATE, BANLABOR, OFFICEINVOICETYPE) | |
| VALUES (40, '09011', 0, 0, 0, 282161, 6, 0, 0, 392, 0, 3.23, '2018-01-01', '2018-01-01', '2016-04-20', 0, 1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace PVT.Q1._2017.Shop.Tests | |
| { | |
| using System.Collections.ObjectModel; | |
| using System.Web.Mvc; | |
| using global::Moq; | |
| using global::Shop.Common.Models; | |
| using global::Shop.DAL.Infrastruture; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public Mock<IAlbumRepository> GetAlbumRepoMoq() | |
| { | |
| var albumRepo = new Mock<IAlbumRepository>(); | |
| albumRepo.Setup(m => m.GetAll(It.IsAny<Expression<Func<Album, BaseEntity>>>())) | |
| .Returns( | |
| new List<Album>() | |
| { | |
| new Album() | |
| { | |
| Id = 1, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [TestMethod] | |
| public void TestAlbumListByArtistId() | |
| { | |
| var mockAlbumRepo = new Mock<IAlbumRepository>(); | |
| mockAlbumRepo.Setup(m => m.GetAll(It.IsAny<Expression<Func<Album, BaseEntity>>>())) | |
| .Returns( | |
| new List<Album>() | |
| { | |
| new Album() | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [assembly: WebActivatorEx.PreApplicationStartMethod(typeof(PVT.Q1._2017.Shop.App_Start.NinjectWebCommon), "Start")] | |
| [assembly: WebActivatorEx.ApplicationShutdownMethodAttribute(typeof(PVT.Q1._2017.Shop.App_Start.NinjectWebCommon), "Stop")] | |
| namespace PVT.Q1._2017.Shop.App_Start | |
| { | |
| using System; | |
| using System.Web; | |
| using Microsoft.Web.Infrastructure.DynamicModuleHelper; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace Shop.DAL.Repositories | |
| { | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Data.Entity; | |
| using System.Linq; | |
| using System.Linq.Expressions; | |
| using Infrastructure.Models; | |
| using Infrastructure.Repositories; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| using System; | |
| using System.Collections.Generic; | |
| using Infrastructure.Models; | |
| /// <summary> | |
| /// The track. | |
| /// </summary> | |
| public class Track : BaseEntity | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| foreach (var pair in list) | |
| { | |
| try | |
| { | |
| var track = new Track { Artist = pair.Key, Name = pair.Value, Genre = "Pop", Year = "2017" }; | |
| var artist = new Artist() { Name = pair.Key }; | |
| // Add tracks to db | |
| tracksSet.Add(track); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| return (from vote in dataset.VotesSet | |
| where vote.TrackId == song.Id | |
| let user = userRepo.Find(vote.UserId) | |
| select new UserVote(vote.Id, user, song, vote.Mark, vote.Comments)).ToList(); |