1553 3
Refresh posts and comments ( get new posts and comments) from graph api facebook.

Hi. I'm using graph api to get posts and comments from facebook page. But I want get the new posts or new comments. Means want to refresh the data coming from graph api.

Is there any way to do that in ASP.NET MVC? Thanks.

...
Type
Question
1525 1
ASP.NET Core - Dependency Injection

My controller:

    [Route("api/[controller]")]
    [ApiController]
    public class CategoriesController : ControllerBase
    {
        private readonly IUnitOfWork unitOfWork;

        public CategoriesController(IUnitOfWork unitOfWork)
        {
            this.unitOfWork = unitOfWork;
        }

        [HttpGet]
        [Route("TestCategories")]
        public ActionResult<IEnumerable<Category>> TestCategories()
        {
            return unitOfWork.Categories.FindAll().ToList();
        }
    }

My Startup:

        public void ConfigureServices(IServiceCollection services)
        {
            services.Configure<CookiePolicyOptions>(options =>
            {
                // This lambda determines whether user consent for non-essential cookies is needed for a given request.
                options.CheckConsentNeeded = context => true;
                options.MinimumSameSitePolicy = SameSiteMode.None;
            });

            services.AddDbContext<ClassifiedAdsDbContext>(options => options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
            services.AddScoped<IUnitOfWork, UnitOfWork>();
            services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
        }

I did break my app so i can understand how the codes work.

As you can see on my controller i used IUnitOfWork (Interface that comes from MyProject.Domain - class library) 

Scenario:

  1. if i use the UnitOfWork class, the only thing the i need to inject (to startup.cs) is the UnitOfWork class only.
  2. if i use the IUnitOfWork interface. i need to inject both (to startup.cs) IUnitOfWork interface and UnitOfWork class as well because it gives error see below.

...

Type
Question
1425 0
Best and Cheap Windows VPS Hosting Providers
In this article, I have provided list of best and cheap windows VPS hosting providers which are good for ASP.NET core or MVC or ASP.NET project
Type
Article
1385 1
Fetch multiple table data using Single Query in ASP.NET using Entity framework.

I want to get data from related entity based on multiple conditions in a single query

I have two tables Employee(EmpId,EmpName) and Attendance(AttId,ScanType,ScanTime,EmpId), I want to display data for each month for all Employees. In Attendance table Scan type have multiple values for in-time and out-time. I want to select smallest value as in-time and largest value as out-time for each employee and store for each employee in view model. ViewModel(EmpId,In-time,Outtime).

What will be the query for this?

 

...
Type
Question
1368 2
How to Login using facebook page(Admin users) instead of facebook Email using OAuth in MVC?

Hi. I need to create a login page where the user is requested to register using his Facebook page, instead of facebook Id, where he is the admin of the facebook page.

I'm using Oauth to login with facebook but want that user to register using his Facebook page for which user is the community manager(admin) while giving permissions to access page's fans information.

...
Type
Question

1329 0
Error System.NullReferenceException while accessing Parent entity property in child entity

I am trying to access a property of parent entity which is on one side of relation while in child entity but it is giving me null reference exception. May be its problem of lazy loading which is not available in entity framework core 2.0. How to access it in core 2.0. These are details of problem

...
Type
Question
1284 1
working with PAGES APIS under developement mode to manage page facebook

Hi, my app is still not aproved by facebook. I heve tried following this link https://qawithexperts.com/questions/351/error-requires-either-publishtogroups-permission-and-app-bei but still now, I haven't heard from facebook yet. I think to deal with apis pages under developement mode.

1 - I have created a new app under my account facebook , and keep the developement mode.

2 - I have get the page access token.

...

Type
Question
1279 1
How to check IIS version in windows server?

Hello, I have just started using Windows Server 2016 on Amazon EC2, but I am not able to check which IIS version I am using, as I would like to have Http/2 support which is starting from IIS 10 as far as I know.

So, let me know how I can check IIS version on windows server?

...
Type
Question
1271 0
Re-request facebook details, if User denies scope ("manage_page") using Startup.cs in ASP.NET Core

Hi, 

Facebook docs give this javascript code as shown below for oAuth login re-request

...
Type
Question
1222 2
Convert lines of C# code from asp.net mvc 5 under visual studio 2015 to asp.net core2 under visual studio 2017

Hello, how can I made this code with asp.net core 2 under Visual studio 2017.

...
Type
Question

Page 28 of 31