Esempio n. 1
0
 public int insertScrumProduct(ScrumProductServiceModel scrumProduct)
 {
     ScrumProductRepository repo = new ScrumProductRepository(entities);
     ScrumProduct model = new ScrumProduct();
     model.CreateDate = DateTime.Now;
     model.Id = 0;
     model.LastUpdatedDate = DateTime.Now;
     model.ProductName = scrumProduct.name;
     return repo.Insert(model);
 }
Esempio n. 2
0
 public static ScrumProductServiceModel mapScrumProductEntityToModel(ScrumProduct scrumProduct)
 {
     ScrumProductServiceModel model = new ScrumProductServiceModel();
     model.createdDate = scrumProduct.CreateDate;
     model.id = scrumProduct.Id;
     model.lastUpdatedDate = scrumProduct.LastUpdatedDate;
     model.name = scrumProduct.ProductName;
     model.owner = scrumProduct.User2;
     return model;
 }
 public int Insert(ScrumProduct entity)
 {
     context.ScrumProducts.Add(entity);
     update();
     return entity.Id;
 }
 public void Update(ScrumProduct entity)
 {
     throw new NotImplementedException();
 }
 public void Delete(ScrumProduct entity)
 {
     context.Entry(entity).State = EntityState.Deleted;
     update();
 }