-1

I have requirement like user can booked space (office, room, meeting room etc) for a rent for particular time period. But requirement is like user required to booked space every month 5th date, or they need that meeting room in every week Friday.

I have no idea from where to start for store data. How to design class or table for requirement.

I have tried for table design like.

public partial class OrderListing 
{
        public int ID { get; set; }
        public DateTimeOffset StartDate { get; set; }
        public TimeSpan StartTime { get; set; }
        public TimeSpan EndTime { get; set; }
        public int Quantity { get; set; }
        public double ListingPrice { get; set; }
        public bool IsRepeatEveryWeek { get; set; }
        public DateTimeOffset? RecurringEndDate { get; set; }
        public bool IsCountPricePerDay { get; set; }
        public int OrderID { get; set; }
}

public class OrderHourlyListingRecurring : Repository.Pattern.Ef6.Entity
{
        public int ID { get; set; }
        public DateTimeOffset StartDate { get; set; }
        public int OrderHourlyListingID { get; set; }
        public virtual OrderListing OrderHourlyListing { get; set; }
}

Is this correct or required some changes?

1

1 Answer 1

0

As a general tip, look at how Outlook handles this.

Example, a recurring apointment every 19th of the month: enter image description here

You can build your classes containing the fields you need for your case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.