I'm trying to build an api using asp.net core 2. When posting from Postman the values received are null.
controller
// POST api/customers
[HttpPost]
public Customer Post(Customer customer)
{
   var c = customer;
   c.AddedDate = DateTime.UtcNow;
   context.AddAsync(c);
   context.SaveChangesAsync();
   return c;
 }
model
namespace AspDotNetCore.Models
{
    public class CRUDContext : DbContext
    {
        public CRUDContext(DbContextOptions<CRUDContext> options) : base(options)
        {
        }
        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
            new CustomerMap(modelBuilder.Entity<Customer>());
        }
    }
    public class BaseEntity
    {
        public Int64 Id { get; set; }
        public DateTime AddedDate { get; set; }
        public DateTime ModifiedDate { get; set; }
        public string IPAddress { get; set; }
    }
    public class Customer : BaseEntity
    {
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public string Email { get; set; }
        public string MobileNo { get; set; }
    }
    public class CustomerMap
    {
        public CustomerMap(EntityTypeBuilder<Customer> entityBuilder)
        {
            entityBuilder.HasKey(t => t.Id);
            entityBuilder.Property(t => t.FirstName).IsRequired();
            entityBuilder.Property(t => t.LastName).IsRequired();
            entityBuilder.Property(t => t.Email).IsRequired();
            entityBuilder.Property(t => t.MobileNo).IsRequired();
        }
    }
}
postman request
{
    "Email": "bob@bob.com",
    "FirstName": "bob",
    "LastName": "barker",
    "MobileNo": "00000000000"
}
 
    