public int Save(SaveTest savableObj) { TestDal dalTest = new TestDal() { Comment = savableObj.Comment, CreatorId = savableObj.CreatorId, DownloadCount = savableObj.DownloadCount, Id = savableObj.Id, Name = savableObj.Name, Price = savableObj.Price, PublishDate = savableObj.PublishDate, SubjectId = savableObj.SubjectId }; if (savableObj.Id == default(int)) { return(_repo.Insert(dalTest)); } _repo.Update(dalTest); return(0); }
public void SetUp() { testDal = new TestDal(); agent = new Agent("GOOG", 100, 12.5m, testDal); }
public TestBL() { dal = new TestDal(); }