public void deleteProduct(Guid id) { objKAProduct = new CRM_KA_ProductRepository(); CRM_KA_Product Product = objKAProduct.GetSingle(x => x.id.Equals(id)); objKAProduct.Delete(Product); }
public CRM_KA_ProductModel getProductById(Guid id) { objKAProduct = new CRM_KA_ProductRepository(); Mapper.CreateMap<CRM_KA_Product, CRM_KA_ProductModel>(); var entity = objKAProduct.GetSingle(x => x.id.Equals(id)); CRM_KA_ProductModel result = new CRM_KA_ProductModel(); result = Mapper.Map(entity, result); return result; }