This is a migrated thread and some comments may be shown as answers.

BaseService???

3 Answers 510 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Randy Hompesch
Top achievements
Rank 1
Randy Hompesch asked on 06 Jun 2019, 07:07 AM

In the demo : https://demos.telerik.com/aspnet-core/grid/editing-popup.

there is code shown  as follows in the ProductService.cs:

      public class ProductService : BaseService, IProductService

Where is the code for BaseService and IProduct Service?

Also, more generally, where can I download the sources to all the demos for .net core?

Thanks … Ed

3 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 11 Jun 2019, 07:08 AM
Hi Ed,

You can run the online examples locally by running the Sample application available with the components. If you have installed the components the sample application will be available in the installation directory in the wrappers\aspnetcore\Examples\AspNet.Core\VS2017\Kendo.Mvc.Examples folder.

In case you have downloaded the archive of the components the demos will be available in the same subfolder in the location where you have extracted the archive. 

With that said, in the code snippets below you will find the code for BaseService and IProductService respectively. 

BaseService.cs


using Kendo.Mvc.Examples.Extensions;
using Kendo.Mvc.Examples.Models;
 
namespace Kendo.Mvc.Examples.Models
{
    public abstract class BaseService
    {
        public virtual SampleEntitiesDataContext GetContext()
        {
            return new SampleEntitiesDataContext();
        }
    }
}


IProductService.cs


using System.Collections.Generic;
 
namespace Kendo.Mvc.Examples.Models
{
    public interface IProductService
    {
        IEnumerable<ProductViewModel> Read();
        void Create(ProductViewModel product);
        void Update(ProductViewModel product);
        void Destroy(ProductViewModel product);
    }
}



Regards,
Viktor Tachev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Benjamin
Top achievements
Rank 1
answered on 03 Sep 2019, 02:41 PM

Hi Viktor,

I do not want to go too fast but it seems to me that the project does not contain an example for BaseService and IProductService. Moreover, this example is for Kendo UI ASP.net MVC (.net Framework) and not Kendo UI ASP.net Core. Finally, can you find an project for Kendo ASP.net Core with bind data to grid like this : https://demos.telerik.com/aspnet-core/grid/editing-inline

Thanks you in advance,

Benjamin.

0
Viktor Tachev
Telerik team
answered on 05 Sep 2019, 11:42 AM

Hello Benjamin,

 

The ProductService, BaseService and IProductService shown in my previous post are exactly the same in the inline editing demo as in the popup editing.

Also the examples located in the wrappers\aspnetcore\Examples\AspNet.Core\VS2017\Kendo.Mvc.Examples folder are targeted for .NET Core. When you run the project you will be able to find the inline editing example there so you can examine it and debug the code.

 

Regards,
Viktor Tachev
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Randy Hompesch
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Benjamin
Top achievements
Rank 1
Share this question
or