Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6230071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:40:57+00:00 2026-05-24T09:40:57+00:00

I have about a dozen fields marked as tinyint, which translates to a byte

  • 0

I have about a dozen fields marked as tinyint, which translates to a byte field. I’m finding that I’m having to do a lot of casting to int in my code to interact with integers.

Because of this, I’m thinking of changing the entity framework to read these as integers instead of bytes. Are there any implications of this, besides the chance that I may pass in an integer that is out of range of the tinyint? Am I just adding additional casts where I may not need them?

(I’m also thinking of just using integer instead in the database, because this isn’t going to be a high usage DB.)

Edit

From Zach’s comment below / Entity Framework Mapping SQL Server tinyint to Int16 — it looks like I can’t just change the property from byte to int? The EF will throw an error? So, is there even a way to do what I’m thinking?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T09:40:57+00:00Added an answer on May 24, 2026 at 9:40 am

    There shouldn’t really be any issue using when you use Integers as the compiler actually optimizes the integers (I’m not mistaken.)

    The best bet would be to change your database values from byte to Int. IMHO.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need a status column that will have about a dozen possible values. Is
I have an object that contains about half a dozen properties. I expect to
I have a Silverlight application which loads about 2000 objects of half a dozen
I have about 200 Excel files that are in standard Excel 2003 format. I
I have about 10million values that I need to put in some type of
I have about 10 drop down list controls that get populated. Instead of copying/pasting
I have about 2000 lines of javascript code for my application. A lot of
I have about half a dozen generic, but fairly complex stored procedures and functions
So, I have a dedicated server. I host about dozen or so small sites.
In my application I have about a dozen of Activities. However, most of these

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.