Ejemplo n.º 1
0
        public async Task <Domain.Entity.Product> UpdateAsync(Domain.Entity.Product product)
        {
            _dbContext.Entry <Domain.Entity.Product>(product).State = EntityState.Modified;
            await _dbContext.SaveChangesAsync();

            return(product);
        }
Ejemplo n.º 2
0
        public Domain.Entity.Product CreateEntity()
        {
            var entity = new Domain.Entity.Product();

            entity.Id   = this.Id;
            entity.Name = this.Name;
            return(entity);
        }
Ejemplo n.º 3
0
 public static ProductDetailDto Create(Domain.Entity.Product entity)
 {
     if (entity == null)
     {
         return(null);
     }
     return(Projection.Compile().Invoke(entity));
 }
Ejemplo n.º 4
0
 public static UpdateProductDto Create(Domain.Entity.Product entity)
 {
     return(Projection.Compile().Invoke(entity));
 }